Recording medium discriminating method and recording apparatus

ABSTRACT

Discrimination of the type of a recording medium with high accuracy is obtained by using the intensity of a specular reflection light from the recording medium and a feature of the recording medium surface derived from an image of the recording medium surface as discrimination parameters. In particular, the accuracy in discrimination between plain paper and ink-jet coated paper and between photographic glossy paper and a glossy film is improved. Also, the type of the recording medium is discriminated based on a detected value of the intensity of the specular reflection light from the recording medium and a parameter representing surface conditions of the recording medium which is derived from an image information made up of a plurality of pixels corresponding to a predetermined area of the recording medium surface.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a recording medium discriminatingmethod for discriminating the type of a recording medium, a recordingapparatus having a function of discriminating the type of a recordingmedium, a program for executing the discrimination as to the type of arecording medium, and a storage medium storing the program. Moreparticularly, the present invention relates to a technique fordiscriminating the type of a recording medium from image informationregarding a surface of the recording medium.

2. Description of the Related Art

Hitherto, various types of output devices, such as electrophotographic,wired-dot, and ink-jet devices, have been practiced as output devices ofprinting systems in which a color image is formed by attaching coloredtoners or inks to a recording surface of a recording medium and thenejecting the recording medium having the color image recorded thereon.

Of those output devices, the ink-jet device has garnered a lot ofattention because such a device directly ejects inks from a recordinghead to the recording medium. This device, thus, requires fewer numberof steps to form an image on the recording medium than other devices,and has additional advantages such as a low running cost, being suitablefor color recording, and it produces less noise during the recordingoperation. For these reasons, the ink-jet device has received attentionin a variety of markets ranging from business to domestic fields.Recently, many recording apparatuses (printers), facsimile machines, andcopying machines have been practiced using output devices of the ink-jettype.

It is generally known that various types of recording media are employedin an ink-jet recording apparatus. The types of recording media includeplain paper, typically used regardless of the recording scheme, ink-jetcoated paper (including a postcard dedicated for ink-jet printing, suchas a New Year's card having the postcard size) in which a coating agent,e.g., silica, is applied to the recording surface of the recordingmedium for suppressing ink blurring and improving color development.Other recording media include: glossy paper and glossy film, which havea glossy appearance on the recording surface of the recording mediumsimilar to photographic paper for glossy print, and which are used forforming photographs and images; an OHP film for a transparent document;transfer paper for transferring an image to a cloth, e.g., using an ironto transfer the image to a T-shirt, after recording the image on therecording medium; and a back print film in which a back surface of therecording medium serves as a recording surface. Thus, there are varioustypes of recording media including others that are familiar to users.

In the ink-jet recording apparatus, because permeability and fixity ofink differ depending on the coating agent applied to the surface of therecording medium, recording conditions for obtaining a good recordedimage differ depending on the type of the recording medium. As a result,before the recording process begins, the user must select or enter thetype of recording medium on which the image is to be recorded into thesystem and must set a recording mode suitable for the recording medium.In so doing, if the user erroneously sets the type of the recordingmedium and the recording mode by mistake, a recording image having thequality demanded by the user cannot be obtained in some cases. To avoidthe troublesome operation required by the user and the possibility of afalse setting, a device for automatically discriminating the type of therecording medium and then selecting and setting an optimum recordingmode has been created. This automatic setting of a suitable recordingmode for the type of the recording medium is needed in not only theink-jet recording apparatus, but also in other types of recordingapparatuses.

FIG. 35 shows one example of a method for discriminating the type of therecording medium. With this method, a light is illuminated from a lightsource to a recording medium, and a reflected light from a surface ofthe recording medium is detected by an optical sensor using aphotoelectric transducer to measure the intensity of the reflectedlight. Referring to FIG. 35, a light source 3501 illuminates a light atan angle θ of incidence (arbitrary value) to a recording medium 3504 ofwhich type is to be determined. A light receiving device 3502 formeasuring the intensity of a specular reflection light receives a lightthat has been reflected at an angle θ of reflection equal to the angle θof incidence at which the light was illuminated from the light source3501. Because the intensity of the specular reflection light changesdepending on a gloss of the recording medium surface, the gloss of therecording medium can be confirmed by measuring the intensity of thespecular reflection light. Further, a light receiving device 3503receives a light having diffusely reflected at an angle different fromthe angle θ of incidence, at which the light was illuminated from thelight source 3501, (e.g., a light having reflected at a right anglerelative to the recording medium in FIG. 35), for measuring theintensity of a diffuse reflection light. Because the intensity of thediffuse reflection light changes depending on the whiteness of therecording medium surface, the whiteness of the recording medium can beconfirmed by measuring the intensity of the diffuse reflection light.The light source 3501 and the light receiving device 3502 receiving thespecular reflection light are set in a layout such that the specularreflection light having reflected from the recording surface of therecording medium 3504 subjected to illumination from the light source3501 can be received by the light receiving device 3502. Likewise, thelight source 3501 and the light receiving device 3503 receiving thediffuse reflection light are set in a layout such that the diffusereflection light having reflected from the recording surface of therecording medium 3504 subjected to illumination from the light source3501 can be received by the light receiving device 3503. By comparingvalues of the intensity of two reflected lights thus obtained withcorresponding values of the intensity of two reflected lights measuredin advance for each type of the recording medium to be used, the type ofthe recording medium is discriminated.

Japanese Patent Laid-open No. 11-271037 discloses an image formingmethod and an image forming apparatus for forming a high-quality imagewithout regard to the type of the recording medium used and surfaceroughness thereof. In the disclosed method and apparatus, surfaceroughness is detected by measuring, as three-dimensional imageinformation, an intensity distribution of a reflected light from arecording medium obtained when a light from a light source isilluminated to the recording medium, and then converting the detectedinformation into a fractal dimension, i.e., one-dimensional information.A toner amount is then controlled to be matched with the surfaceroughness of the recording medium.

Also, the assignee of the present application has previously proposed adiscriminating device and a discriminating method in which, with asystem employing a plurality of light receiving devices, the type of therecording medium is discriminated based on a gloss of the recordingmedium surface and fiber orientation of the recording medium surface.With this method, the fiber orientation of the recording medium surfaceis detected from a variation in intensity of diffuse reflection lightsensed by the plurality of light receiving devices.

The related art described above, however, has problems as follows.

FIG. 36 shows the relationships of various types of recording mediaversus the intensity of the specular reflection light and the intensityof the diffuse reflection light. In FIG. 36, numeral 3601 represents adistribution region of plain paper in terms of the intensity of thespecular reflection light and the intensity of the diffuse reflectionlight. Likewise, numerals 3602, 3603, 3604, 3605 and 3606 representdistribution regions of ink-jet coated paper, glossy paper, photographicglossy paper, a glossy film, and an OHP film, respectively. As seen fromFIG. 36, it is difficult to accurately discriminate plain paper andink-jet coated paper from the relationships between the recording mediaand two reflected-light components, i.e., the specular reflection lightand the diffuse reflection light.

The intensity of the specular reflection light representing the gloss ofthe recording medium is given a value corresponding to the surfaceroughness so long as the recording medium is formed of the same material(although the intensity of the specular reflection light is indirectlyaffected by not only a surface layer, but also an intermediate layer).Accordingly, the intensity of the specular reflection light can be usedas a parameter for discriminating the type of the recording medium.However, because various types of recording media are formed of avariety of different materials, there is a possibility that differenttypes of recording media in fact provide values of the intensity of thespecular reflection light comparable to each other. Such a case isconfirmed, by way of example, with plain paper and ink-jet coated paper.Ink-jet coated paper has a higher smoothness (which is increased as therecording medium has a flatter and smoother surface) than plain paper,and therefore it provides a greater intensity of the specular reflectionlight if the recording medium is formed of the same material. However,light diffusion by the ink-jet coated paper is increased with thepresence of a pigment, e.g., silica, applied to its surface. As aresult, the value of the intensity of the specular reflection light fromthe ink-jet coated paper is comparable to or slightly smaller than thatof the plain paper.

Further, many types of plain paper and ink-jet coated paper provideclose values of the intensity of the diffuse reflection light thatrepresents whiteness of the recording medium. The reason is that usersprefer recording media having a high degree of whiteness, which makeblack characters appear more tightly and provide a better color tint ofa photographic image. In the past, placing a coat of calcium carbonateon the recording medium surface has been avoided for the problem thatcalcium carbonate scrapes a fusing roller used in an image formingapparatus employing the electrophotographic technique, such as a copyingmachine. Recently, however, calcium carbonate has been widely coatedbecause of increased durability of the fusing roller. The coating ofcalcium carbonate is effective in increasing the whiteness of therecording medium, but it becomes difficult to discriminate plain paperhaving high whiteness because of a coating of calcium carbonate fromink-jet coated paper.

Thus, in a conventional system employing reflection optical sensors formeasuring the intensity of the specular reflection light and theintensity of the diffuse reflection light, it is difficult todiscriminate plain paper and ink-jet coated paper from each other. Thisleads to a serious problem in an ink-jet recording apparatus in whichrecording conditions, such as the amount of ejected ink and the numberof scans, i.e., passes, of a recording head for recording a one-lineimage differ depending on the type of the recording medium. In theabove-mentioned two types of recording media, particularly, asignificant difference exists in the recording conditions and hence aserious image quality problem results as well.

Also, in electrophotographic recording apparatuses other than theink-jet recording apparatus, if users mistakenly place ink-jet coatedpaper instead of plain paper in a cassette storing the recording medium,there is a risk that the recording medium will wrap around the fusingroller and cause a paper jam. In other words, the necessity ofaccurately discriminating various types of recording media for ink-jetprinting, which are widely put into the market, is a problem notrestricted to the field of ink-jet recording apparatuses.

To solve the above-mentioned problem, the inventors have studied as amethod of discriminating plain paper and ink-jet coated paper from eachother with high accuracy, a method wherein the features of the surfaceroughness and the surface shape of a recording medium are obtained fromimage information regarding a surface of the recording medium by usingan image sensor, as shown in FIG. 37, and then discriminating the typeof the recording medium. Here, the surface roughness implies a featureregarding the magnitude of unevenness of the recording medium surface,and the surface shape implies a feature regarding the period ofunevenness of the recording medium surface.

FIG. 37 is a schematic view showing a sensor system for discriminatingthe type of the recording medium by using the image sensor.

Referring to FIG. 37, a light source 3701 illuminates a light at anangle θ of incidence (arbitrary value) to a recording medium 3703 ofwhich type is to be discriminated. Also, an image sensor 3702 createsimage information regarding a surface of the recording medium from acomponent of diffuse reflection light having reflected at an angledifferent from the angle θ of incidence at which the light wasilluminated from the light source 3701 (in FIG. 37, a light havingreflected at a right angle relative to the recording medium). The lightsource 3701 and the image sensor 3702 are set in a layout such that thediffuse reflection light having reflected from the recording surface ofthe recording medium 3703 subjected to illumination from the lightsource 3701 can be received by the image sensor 3702.

By comparing parameters representing surface conditions of the recordingmedium obtained from the image information resulting from theabove-described sensor system with corresponding parameters measured inadvance and representing surface conditions of the recording medium ofthe type which is to be used, the type of the recording medium isdiscriminated. FIG. 38 shows the relationships of various types ofrecording media versus a brightness difference and an average value ofbrightness. Those relationships are obtained when employing, as twoexamples of the parameters representing surface conditions of therecording medium, the brightness difference, i.e., the differencebetween maximum and minimum values of brightness in image informationcomprising a plurality of pixels, and the average value of thebrightness. Numeral 3801 represents a distribution region of plainpaper. Likewise, numerals 3802, 3803, 3804, 3805 and 3806 representdistribution regions of ink-jet coated paper, glossy paper, photographicglossy paper, a glossy film, and an OHP film, respectively. As seen fromFIG. 38, it is possible to discriminate plain paper and ink-jet coatedpaper based on the plotted relationship.

With the above-described system using the image sensor, plain paper andink-jet coated paper, which have been usually employed for recording inthe past, can be discriminated from each other. However, it is difficultto discriminate several types of recording media used in high qualityimage recording.

More specifically, while attention has been recently focused onphotographic glossy paper, which is a recording medium capable ofrecording an image with a quality comparable to that of a photographprinted on photographic paper, and on a glossy film using white PET,etc. as a base, it is difficult to accurately discriminate those twotypes of recording media because both recording media have high glossvalues. The reason is that, as a result of various improvements inrecording an image with a quality comparable to that of a photographprinted on photographic paper, photographic glossy paper has a highersmoothness than conventional glossy paper, thus the glossy film and thephotographic glossy paper have similar physical properties, such assurface roughness and surface shape.

SUMMARY OF THE INVENTION

With the view of overcoming the above-mentioned problems in the relatedart, the present invention is intended to discriminate the type of arecording medium with high accuracy. Particularly, it is an object ofthe present invention to provide a recording medium discriminatingmethod capable of discriminating plain paper, ink-jet coated paper, anda recording medium having a high gloss, i.e., a glossy film orphotographic glossy paper, with high accuracy. Other objectives of thepresent invention include providing a recording apparatus having afunction of discriminating the type of a recording medium, a program forexecuting the discrimination as to the type of a recording medium, and astorage medium storing the program.

The present invention provides a recording medium type discriminatingmethod for discriminating the type of a recording medium comprising astep of creating image information indicating surface conditions of therecording medium, wherein the image information contains information foreach of a plurality of pixels corresponding to a predetermined area of arecording medium surface; a step of detecting a gloss level of therecording medium surface; a step of obtaining, from the imageinformation, a parameter regarding the surface conditions of therecording medium; and a step of discriminating the type of the recordingmedium based on the gloss level and the parameter regarding the surfaceconditions of the recording medium.

Also, the present invention provides a recording medium typediscriminating method for discriminating the type of a recording mediumcomprising: a step of creating image information indicating surfaceconditions of the recording medium, wherein the image informationcontains information for each of a plurality of pixels corresponding toa predetermined area of a recording medium surface and brightnessinformation for each of the plurality of pixels; a step of detecting agloss level of the recording medium surface; and a step ofdiscriminating the type of the recording medium based on the gloss leveland a parameter obtained from the brightness information.

Further, the present invention provides a program for causing a computerto execute a process for discriminating the type of a recording medium,the program comprising program codes for executing a step of creatingimage information indicating surface conditions of the recording medium,wherein the image information contains information for each of aplurality of pixels corresponding to a predetermined area of a recordingmedium surface and brightness information for each of the plurality ofpixels; a step of detecting a gloss level of the recording mediumsurface; and a step of discriminating the type of the recording mediumbased on the gloss level and a parameter obtained from the brightnessinformation.

Still further, the present invention provides a computer-readablestorage medium storing a program to discriminate the type of a recordingmedium, the storage medium storing an image information creating modulefor creating image information indicating surface conditions of therecording medium, wherein the image information contains information foreach of a plurality of pixels corresponding to a predetermined area of arecording medium surface and brightness information for each of theplurality of pixels; a detecting module for detecting a gloss level ofthe recording medium surface; and a discriminating module ofdiscriminating the type of the recording medium based on the gloss leveland a parameter obtained from the brightness information.

In addition, the present invention provides a recording apparatus forrecording an image on a recording medium, which is fed by a feed unit inaccordance with recording data, wherein the apparatus comprises: animage information creating unit for creating image informationindicating surface conditions of the recording medium fed by the feedunit, wherein the image information contains information for each of aplurality of pixels corresponding to a predetermined area of a recordingmedium surface and brightness information for each of the plurality ofpixels; a detecting unit for detecting a gloss level of the recordingmedium surface; and a discriminating unit for discriminating the type ofthe recording medium based on the gloss level and a parameter obtainedfrom the brightness information.

According to the present invention having the features set forth above,the following advantages are obtained.

The parameters required for discriminating the type of the recordingmedium are obtained from both the intensity of the specular reflectionlight from the recording medium to be detected and the image informationof the arbitrary small area of the recording medium surface. The type ofthe recording medium is discriminated based on these obtainedparameters. Therefore, the type of the recording medium can bediscriminated with higher accuracy than is possible with theconventional methods of discriminating the type of the recording mediumby using a reflection optical sensor or an image sensor. In particular,the accuracy in discriminating between plain paper and ink-jet coatedpaper and between photographic glossy paper and a glossy film can beimproved. Accordingly, it becomes possible to discriminate most types ofrecording media selectable by a printer driver, and hence it is possibleto provide an environment capable of properly selecting and settingvarious recording conditions without requiring users to performtroublesome operations.

Also, by employing an image sensor, an image of the recording mediumsurface can be produced through a measurement made on only one point,and therefore the need of moving the recording medium or the imagesensor is no longer essential. As a matter of course then, there is nolonger a need for a mechanical mechanism for moving the recording mediumor the image sensor.

In addition, the accuracy in discriminating between photographic glossypaper and a glossy film can be improved by employing the intensity ofthe specular reflection light.

Further objects, features and advantages of the present invention willbecome apparent from the following description of the preferredembodiments with reference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional block diagram showing a recording mediumdiscriminating method according to a first embodiment of the presentinvention.

FIG. 2 is a schematic view showing a layout of a sensor for measuring areflected light in the first embodiment.

FIG. 3 is a functional block diagram of an image information creatingunit in the first embodiment.

FIG. 4 is a histogram showing the relationship between the number ofpixels and a brightness value for an image in the first embodiment.

FIGS. 5A and 5B show, by way of example, an image showing surfaceconditions of a recording medium and an image obtained after binarycoding in the first embodiment, respectively.

FIG. 6 is a representation for explaining the number of times each pixelvalue is reversed between 0 and 1 after the binary coding in the firstembodiment.

FIG. 7 is a discrimination map showing the relationships of varioustypes of recording media versus the number of reversals (of pixelvalues) and the intensity of a specular reflection light in the firstembodiment.

FIG. 8 is a flowchart showing a flow of a recording medium typediscrimination process in the first embodiment.

FIG. 9 is a flowchart showing a process flow for discrimination of thetype of the recording medium in the first embodiment.

FIG. 10 is a schematic perspective view of a recording apparatusaccording the first embodiment.

FIG. 11 is a functional block diagram showing the system configurationin the first embodiment.

FIG. 12 is a functional block diagram showing a recording mediumdiscrimination method according to a second embodiment of the presentinvention.

FIGS. 13A and 13B are representations for explaining run-length encodingand a code amount in the second embodiment.

FIG. 14 is a discrimination map showing the relationships of varioustypes of recording media versus a run-length code amount and theintensity of a specular reflection light in the second embodiment.

FIG. 15 is a flowchart showing a flow of a recording medium typediscrimination process in the second embodiment.

FIG. 16 is a recording medium type discrimination table in the secondembodiment.

FIG. 17 is a functional block diagram of a recording mediumdiscrimination method according to a third embodiment of the presentinvention.

FIG. 18 is a representation for explaining the number of isolated pixelsafter binary coding in the third embodiment.

FIG. 19 is a discrimination map showing the relationships of varioustypes of recording media versus the number of isolated pixels and theintensity of a specular reflection light in the third embodiment.

FIG. 20 is a functional block diagram showing a recording mediumdiscrimination method according to a fourth embodiment of the presentinvention.

FIG. 21 is a representation for explaining the number of times positiveand negative signs of a brightness difference between adjacent pixelsreverse in the fourth embodiment.

FIG. 22 is a discrimination map showing the relationships of varioustypes of recording media versus the number of reversals of positive andnegative signs and the intensity of a specular reflection light in thefourth embodiment.

FIG. 23 is a functional block diagram of a recording mediumdiscrimination method according to a fifth embodiment of the presentinvention.

FIG. 24 shows histograms representing various types of recording mediain the fifth embodiment.

FIG. 25 is a discrimination map showing the relationships of varioustypes of recording media versus the number of peak pixels and theintensity of a specular reflection light in the fifth embodiment.

FIG. 26 is a flowchart showing a flow of a recording medium typediscrimination process in the fifth embodiment.

FIG. 27 is a flowchart showing a process flow for discrimination of thetype of the recording medium in the fifth embodiment.

FIG. 28 is a functional block diagram of a recording mediumdiscrimination method according to a sixth embodiment of the presentinvention.

FIG. 29 is a histogram showing the relationship between the number ofpixels and a brightness value for an image in the sixth embodiment.

FIG. 30 is a discrimination map showing the relationships of varioustypes of recording media versus a brightness difference and theintensity of a specular reflection light in the sixth embodiment.

FIG. 31 is a flowchart showing a flow of a recording medium typediscrimination process in the sixth embodiment.

FIG. 32 is a flowchart showing a process flow for discrimination of thetype of the recording medium in the sixth embodiment.

FIG. 33 shows a memory map of a storage medium for use in a seventhembodiment.

FIG. 34 is a representation showing conversion from two-dimensionalimage information into one-dimensional image information in stillanother embodiment.

FIG. 35 is a schematic view showing one layout of a sensor in therelated art.

FIG. 36 is a discrimination map showing the relationships of varioustypes of recording media versus the intensity of the specular reflectionlight and the intensity of a diffuse reflection light in the relatedart.

FIG. 37 is a schematic view showing another layout of a sensor in therelated art.

FIG. 38 is a discrimination map showing the relationships of varioustypes of recording media versus a brightness difference and an averagevalue of brightness in the related art.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

(First Embodiment)

A first embodiment implementing the present invention will be describedbelow in detail with reference to the drawings. Each of the elementsshown in block outline in the figures is well known per se, and aspecific type of construction is not critical to carrying out theinvention or to a disclosure of the best mode for carrying theinvention.

FIG. 1 is a functional block diagram showing a recording mediumdiscriminating method according to a first embodiment of the presentinvention.

Referring to FIG. 1, a specular-reflection-light intensity detectingunit 101 detects the intensity of one component of reflected light froma surface of a recording medium, which is illuminated by a light source,i.e., the intensity of a specular reflection light having reflected atan angle of reflection equal to an angle of incidence is detected.

An image information creating unit 102 creates image information from anarbitrary small area of the recording medium surface. An image createdby the image information creating unit 102 is made up of a plurality ofpixels each having a brightness value larger than a one-bit value. It ishere assumed that the image is a set of pixels having 8-bit brightnessinformation. In this context, each pixel may have or may not have colorinformation of RGB. The image of the arbitrary small area may be a one-or two-dimensional image. Also, a new image may be re-formed so thatonly a particular area of an originally obtained image is used fordiscrimination of the recording medium. In this embodiment, it isassumed that image information is created from a component of diffusereflection light, and each of the pixels constituting an image has nocolor information, but has only brightness information. One example of alayout of an optical sensor used in this embodiment for measuring thespecular reflection light and creating the image information will bedescribed later with reference to FIG. 2. Details of a function ofcreating the image information in the image information creating unit102 will be described later with reference to FIG. 3.

A maximum/minimum value detecting unit 103 detects, from the imageinformation made up of a plurality of pixels and obtained in the imageinformation creating unit 102, maximum and minimum values of brightnessby referring to brightness values of the pixels. The pixels subjected tothe detection of brightness values are all or a part of the pixelsconstituting the above-mentioned image of the small area used for thediscrimination of the recording medium.

An arithmetic mean value calculating unit 104 calculates an arithmeticmean value of the maximum and minimum brightness values obtained in themaximum/minimum value detecting unit 103 (i.e., a value resulting fromadding the maximum and minimum values and dividing the sum by two).

A binary coding unit 105 codes the image information obtained in theimage information creating unit 102 into binary values by employing, asa threshold, the arithmetic mean value obtained in the arithmetic meanvalue calculating unit 104. A number-of-reversals calculating unit 106calculates the number of times the pixel values, i.e., 0 and 1, arereversed, from the binary image (also called binary data) obtained inthe binary coding unit 105. Details of the calculation of the number ofreversals of pixel values will be described later with reference to FIG.6.

A recording medium type discrimination unit 107 discriminates the typeof the recording medium. The type of the recording medium isdiscriminated by both the intensity of the specular reflection lightobtained in the specular-reflection light intensity detecting unit 101and the number of reversals of pixel values obtained in thenumber-of-reversals calculating unit 106. The discrimination of the typeof the recording medium is performed using parameters 108 fordiscrimination, which are derived from a discrimination map prepared inadvance and which shows the relationships of various types of recordingmedia versus the intensity of the specular reflection light and thenumber of reversals of pixel values. Details of a method fordiscriminating the type of the recording medium will be described below.Numeral 108 denotes parameters for discrimination, which are used indiscriminating the type of the recording medium in the recording mediumtype discrimination unit 107, i.e., thresholds decided based ondistributions measured for the various types of recording media.

Thus, the process flow comprises the steps of detecting the intensity ofthe specular reflection light from the recording medium, calculating thenumber of reversals of pixel values from the image information of thearbitrary small area of the recording medium surface, and thendiscriminating the type of the recording medium based on those results.

FIG. 2 is a schematic view showing one example of the layout of a sensorsection for measuring the reflected light in FIG. 1.

A light source 201 illuminates a light at an angle θ of incidence to arecording medium 204 of which type is to be discriminated. The angle θof incidence is an arbitrary value. In this embodiment, however, whenthe feature of the recording medium is obtained from an image of therecording medium surface as described later, the features of each typeof the recording medium appear more noticeably by setting the angle θ ofincidence to a larger value. The reason is that setting the angle θ ofincidence to a larger value makes shadows more apparent as theunevenness of the recording-medium surface increases, whereby a patternof light and dark more clearly appears in the image and a brightnessdifference is produced. In other words, the angle θ of incidence ispreferably set such that a pattern of light and dark in the imagerepresenting a brightness difference more noticeably appears. A lightreceiving device 202 receives a light having reflected at an angle θ ofreflection equal to the angle θ of incidence at which the light wasilluminated from the light source 201. The light source 201 and thelight receiving device 202 receiving the specular reflection light areset in a layout such that the specular reflection light having reflectedfrom the recording surface of the recording medium 204 subjected toillumination from the light source 201 can be received by the lightreceiving device 202. Another light receiving device 203 receives alight having diffusely reflected at an angle different from the angle θof incidence at which the light was illuminated from the light source201, (e.g., a light having reflected at a right angle relative to therecording medium in FIG. 2). The light source 201 and the lightreceiving device 203 receiving the diffuse reflection light are set in alayout such that the diffuse reflection light having reflected from therecording surface of the recording medium 204 can be received by thelight receiving device 203. Numeral 204 denotes a recording medium ofwhich type is to be discriminated. Though not shown in FIG. 2, lensesfor use in illuminating and focusing systems are also provided.

FIG. 3 is a functional block diagram of the image information creatingunit 102 shown in FIG. 1.

An illuminating unit 301 illuminates the recording medium surface. Inpractice, the illuminating unit 301 comprises a light source, e.g., anLED, and an illumination lens. A light receiving unit 302 receives areflected light from the recording medium surface. The light receivingunit 302 is constituted by an image sensor, an area sensor such as a CCDor CMOS, or a line sensor, and it comprises a plurality of lightreceiving devices.

A digital signal converter 303 is constituted by an A/D converter forconverting analog signals from the light receiving unit 302, as anassembly of the plurality of light receiving devices, into digitalsignals for each pixel. A correcting unit 304 corrects the signals fromthe digital signal converter 303. The correction includes, for example,shading correction of the light source and correction for suppressingvariations among the pixels. Another example is a process for convertinga bit length of the digital signal outputted from the digital signalconverter 303 into a smaller value.

A control unit 305 comprises a CPU, logics, etc. for executing variouscontrols of the image information creating unit 102, such as theilluminating unit 301 and the correcting unit 304. The control unit 305first controls the illuminating unit 301 to illuminate the recordingmedium surface, and then controls the light receiving unit 302 toreceive a reflected light from the recording medium surface and tooutput a measured value. Subsequently, the digital signal converter 303is controlled to convert the measured value, which is in the form of ananalog signal for each pixel in the reflected light received by thelight receiving unit 302, into a digital signal. Further, the controlunit 305 controls the correcting unit 304 to execute various correctionsto the digital signal. A subsequent process is performed using imageinformation that is outputted from the correcting unit 304 and isconstituted as brightness information for each of a plurality of pixels.At this time, a process of restricting an image area to be processed,for which the light receiving unit 302 can create the image information,may be additionally provided.

FIG. 4 is a histogram showing the relationship between the number ofpixels and a brightness value for an image. The horizontal axisrepresents the brightness value, and the vertical axis represents thenumber of pixels having respective brightness values.

Numeral 401 denotes a histogram of the pixels constituting the imageinformation in terms of brightness. The histogram ideally exhibits anormal distribution, as shown, when measuring an image made up of anumber of pixels not smaller than a certain value. Numeral 402 denotes aminimum of the brightness values of the pixels constituting the imageinformation. Numeral 403 denotes a maximum of the brightness values ofthe pixels constituting the image information. Numeral 404 denotes adifference between the maximum and minimum brightness values of thepixels constituting the image information. Numeral 405 denotes a valueat which the brightness difference 404 is divided into two equal parts,i.e., an arithmetic mean value of the maximum and minimum brightnessvalues. In this embodiment, the arithmetic mean value is used as athreshold for the binary coding. In the following description of thepresent invention, the values denoted by 404 and 405 will be referred toas “brightness difference” and “arithmetic mean value”, respectively.

FIGS. 5A and 5B respectively show examples of images obtained before andafter the binary coding executed in the binary coding unit 105 shown inFIG. 1.

FIG. 5A is an image of a photograph before the binary coding obtainedwhen the image information is created from plain paper. Note that animage of the recording medium surface obtained in the image informationcreating unit 102 is constituted by multi-value brightness information.Also, since image contrast is in fact not as clear as shown in FIG. 5A,the illustrated image is adjusted in contrast for easier understanding.FIG. 5B shows an image obtained after binary-coding the image shown inFIG. 5A by employing, as a threshold, the arithmetic mean value 405obtained in the arithmetic mean value calculating unit 104. Thus, theimage after the binary coding is provided as a collection of pixelshaving information of one of a possible two values, i.e., white or black(data 1 or 0).

FIG. 6 is a representation for explaining the number of times each pixelvalue is reversed between 0 and 1 after the binary coding in thenumber-of-reversals calculating unit 106 shown in the first embodiment.As shown in FIG. 6, a one-dimensional linear image is obtained as atarget image for processing, and the image after the binary coding isconstituted by an array of white and black pixels. The white and blackpixels are in fact pixels each having a value of 0 or 1. (Although thisembodiment is described in connection with, by way of example, the casein which the black pixel has a value of 0 and the white pixel has avalue of 1, the white and black pixels may be given values in adifferent way, such that the white pixel has a value of 0 and the blackpixel has a value of 1).

Numeral 601 denotes a pixel at a certain position in an image after thebinary coding. The pixel 601 is a black pixel and has a value of 0. Apixel on the right side of the pixel 601 is a white pixel. Subsequently,as shown, a black pixel, a black pixel, a black pixel, a white pixel, awhite pixel, and so on continue. Numeral 602 denotes a pixel at the20-th position counted from the pixel 601 at a certain position. Thepixel 602 is a white pixel and has a value of 1.

The white and black pixels (values of 1 and 0) after the binary codingare reversed from one to the other at points indicated by arrows shownin FIG. 6. Thus, each arrow indicates a change from the black pixel tothe white pixel (from 0 to 1) or a change from the white pixel to theblack pixel (from 1 to 0). Assuming that the number of reversals beforethe pixel 601 is (N−1), since the pixel value is reversed 11 timesbetween the pixels 601 and 602, the number of reversals before the pixel602 is (N+10). The number of reversals of pixel values in the targetimage is calculated in such a way and is employed as a parameter fordiscriminating the type of the recording medium.

In this embodiment of the present invention, two kinds of features ofthe recording medium surface are obtained as parameters, and the type ofthe recording medium is discriminated based on these parameters. Bymeasuring the intensity of the specular reflection light describedabove, the feature regarding the magnitude of unevenness of therecording medium surface is obtained. Also, by measuring the number ofreversals of pixel values corresponding to changes in brightnessinformation in accordance with an array of successive pixels, thefeature regarding the period of unevenness of the recording mediumsurface is obtained. Herein, the magnitude of unevenness of therecording medium surface is referred to as a “smoothness or glossfeature”, and the period of unevenness of the recording medium surfaceis referred to as a “surface shape feature”. A manner of discriminatingthe type of the recording medium based on those two features will bedescribed below.

FIG. 7 is a discrimination map showing the relationships of varioustypes of recording media versus the number of reversals of pixel valuesand the intensity of the specular reflection light. Values denoted by A1to A3 and B1 to B3 in FIG. 7 are used as the parameters 108 fordiscrimination shown in FIG. 1. Circular regions in FIG. 7 eachrepresent a set of points corresponding to the measured results, anddiscrimination areas are defined by dividing a map plane as shown basedon the circular regions.

Numeral 701 represents an area in which the recording medium undermeasurement is discriminated to be plain paper. Numeral 702 representsan area in which it is discriminated to be ink-jet coated paper. Numeral703 represents an area in which it is discriminated to be glossy paper.Numeral 704 represents an area in which it is discriminated to bephotographic glossy paper. Numeral 705 represents an area in which it isdiscriminated to be a glossy film. Numeral 706 represents an area inwhich it is discriminated to be an OHP film.

In FIG. 7, the vertical and horizontal axes representing the number ofreversals of pixel values and the intensity of the specular reflectionlight are each divided by three points to define four areas for eachaxis. However, an area used for discriminating the recording medium isnot necessarily limited to a rectangular shape. Also, the areascorresponding to values of the number of reversals not larger than A1and sandwiched between the plain paper discrimination area 701 and theOHP film discrimination area 706 are not allocated as areas used fordiscriminating the recording medium. Those areas can also be used as anarea in which the recording medium is discriminated to be plain paper,or an area in which the recording medium is discriminated to be an OHPfilm. Stated otherwise, while it is required that, in each of thecircular regions shown in FIG. 7, the recording medium be discriminatedto be a particular type of recording medium, discrimination in otherareas can be performed in a flexible manner.

A description is now briefly made of tendencies in the features of sixtypes of recording media which are to be discriminated in thisembodiment, and in the relationships of the various types of recordingmedia versus the intensity of the specular reflection light and thenumber of reversals of pixel values. The six types of recording mediaare plain paper (LC-301; made by Canon Inc.), ink-jet coated paper(HR-101s; made by Canon Inc.), glossy paper (GP-301; made by CanonInc.), photographic glossy paper (PR-101; made by Canon Inc.), a glossyfilm (HG-201; made by Canon Inc.), and an OHP film (CF-102).

Table 1, given below, lists results obtained by measuring a gloss(specular gloss) of a surface of each recording medium using aglossmeter (Precise Glossmeter GM-26D; made by Murakami Color ResearchLaboratory, Co., Ltd.). The angle of reflection in the measurement was60 degrees.

TABLE 1 Photo- graphic Plain Coated Glossy glossy Glossy OHP paper paperpaper paper film film Gloss 3.7 to 2.4 to 20.4 51.3 88.1 121.7 (%) 5.04.0

Table 2, given below, lists results obtained by measuring surfaceroughness of each type of recording medium with a non-contact surfaceshape measuring device (three-dimensional laser interferometer New View5000; made by ZYGO).

TABLE 2 Photo- graphic Plain Coated Glossy glossy Glossy OHP paper paperpaper paper film film Mean 2.75 to 1.19 0.21 0.08 0.05 0.15 roughness3.20 Ra (μm) Maximum 28.9 to 21.9 16.0 1.05 0.83 10.9 roughness 33.5Rmax (μm)

Plain paper is a general recording medium that is also used in copyingmachines, etc. Pulp fibers making up the plain paper appear on a papersurface. As listed in Table 2, there is a tendency that the magnitude ofunevenness of the plain paper is larger than those of the other types ofrecording media, and the unevenness is reflected as inconsistencies inbrightness in the created image information. Such a tendency results ina low gloss level. Further, changes in asperities resulting from theunevenness are more moderate than those in the other recording media andare related to a larger period of the unevenness. In addition, moremoderate changes in asperities are related to fewer numbers of reversalsof pixel values in the image after the binary coding.

Ink-jet coated paper is a recording medium formed by coating a pigment,e.g., silica, on a surface of plain paper. Though depending on an amountof the coated pigment, the pigment is generally coated so as to fillrecesses in surface unevenness caused by pulp fibers. Therefore, theunevenness of the ink-jet coated paper is smaller than that of the plainpaper, resulting in a smaller surface roughness and a shorter period ofthe unevenness. This leads to a tendency that the number of reversals ofpixel values increases. The gloss level of the ink-jet coated paper iscomparable to or lower than that of the plain paper.

Glossy paper is a recording medium formed by coating several layers ofan ink accepting substance on a surface of paper serving as a base. Analumina-based pigment or a PVA-based swelling resin is used as an inkaccepting layer that constitutes a surface layer of the recordingmedium. The glossy paper has a smaller magnitude of unevenness than theplain paper and the ink-jet coated paper, and thus it has a highersmoothness and a higher gloss level. The period of unevenness of theglossy paper is also smaller than that of the plain paper and theink-jet coated paper. This leads to a tendency that the number ofreversals of pixel values increases.

Photographic glossy paper is a recording medium formed by processing thephotographic glossy paper in a manner similar to the above-mentionedglossy paper. In addition, various improvements are performed on a papersurface to realize an image quality and weatherability comparable tothose of a photograph printed on photographic paper. The photographicglossy paper has a smaller magnitude of unevenness than the glossypaper, and thus it has a higher smoothness and a higher gloss level. Asa result, there is a tendency that the photographic glossy paperprovides a slightly higher number of reversals of pixel values than theglossy paper.

A glossy film is a recording medium formed by coating an ink acceptinglayer on a surface of a film that is made of, e.g., white PET, whichserves as a base. The glossy film has a smaller magnitude of unevennessthan the glossy paper, and thus it has a higher smoothness and a highergloss level. Also, the smoothness of the glossy film is slightly higherthan that of the photographic glossy paper. The reason is thatunevenness (smoothness) of a material used as the base affects theunevenness of the recording medium surface. More specifically, comparingthe glossy film using a film as the base to the photographic glossypaper using paper as the base, the glossy film uses a material having ahigher smoothness as the base, and thus exhibits a slightly highersmoothness. Further, the gloss level of the glossy film tends to beslightly higher than that of the photographic glossy paper. The reasonis that, when measuring the intensity of the specular reflection light,the specular reflection light contains not only a light reflected by therecording medium surface, but also a light reflected by a base or faceof the recording medium, which increases the gloss level. Moreover,there is a tendency that the glossy film provides a slightly highernumber of reversals of pixel values than the glossy paper.

An OHP film is a recording medium formed by coating an ink acceptinglayer on a surface of a transparent film serving as a base. In thisembodiment, the OHP film that was measured was coated with a fine powderof silica in order to prevent the film from sticking. Because thespecific nature of the OHP film is such that it has a higher smoothnessthan the glossy film, the surface roughness of the OHP film should besmaller than that of the glossy film. However, actual measurementprovided a result that the OHP film had a larger surface roughness dueto the coarse particles of the silica. Also, since the light illuminatedfrom the light source may pass through the recording medium withoutbeing reflected by the recording medium surface, the brightness valueobtained from a reflected light, which is measured as a component ofdiffuse reflection light, is very small and the brightness difference ishardly noticeable. Hence, the brightness value is hardly changed and thenumber of reversals of pixel values is also reduced. Further, since mostof the light reflected by the recording medium surface is a component ofspecular reflection light, the gloss level of the OHP film tends to behigher than those of the other types of recording media.

The above-described relationships of the various types of recordingmedia versus the intensity of the specular reflection light, thebrightness difference and the number of reversals of pixel values aresummarized in Table 3 given below.

TABLE 3 Photo- graphic Plain Coated Glossy glossy Glossy OHP paper paperpaper paper film film (a) (b) (c) (d) (e) (f) Specular low low mediumhigh higher higher reflection than (d) than (d) light intensity Numberof small medium large larger larger hardly reversals than (c) than (c)appre- ciable

As described above, each type of recording medium has featuresrepresented by the gloss level obtained from the intensity of thereflected light from the recording medium and by surface conditionsindicative of the period and the unevenness of the recording mediumsurface. In this embodiment, those features are reflected in twoparameters, i.e., the intensity of the specular reflection light (gloss)and the number of reversals of pixel values, which are then used for thediscrimination. As a result, the discrimination between the plain paperand the ink-jet coated paper, which has been difficult whendiscriminating using the intensity of the specular reflection light,i.e., the glossy as the only discrimination parameter, can be made withhigher accuracy by utilizing the number of reversals of pixel values aswell. Also, the discrimination between the photographic glossy paper andthe glossy film, which has been difficult when the only discriminationparameter is the parameter obtained from the image information, e.g.,the number of reversals of pixel values, can reliably be made by usingthe intensity of the specular reflection light as a discriminationparameter as well.

In the present invention, while the type of the recording medium isdiscriminated by confirming the features of the recording medium inadvance, and then comparing the features with the correspondingparameters, it is important that the gloss level and the surface shapealso be used for the discrimination.

An improvement in the accuracy of the above-described discrimination isgreatly affected by both the size of the area referred to for thediscrimination and the number of pixels (resolution) making up an imageof the area. Therefore, a description is now made of the number ofpixels and the pixel pitch. The number of pixels used for thediscrimination is not less than 50, and the pixel pitch used for thediscrimination is not larger than 50 μm (resolution is not less than 500dpi). To realize the discrimination at a certain level of reliability,however, it is preferable that the number of pixels be not less than 100and the pixel pitch be not larger than 20 μm (resolution be not lessthan 1200 dpi). Note that the above-mentioned conditions are notnecessarily required in order to realize the discrimination. Further,the required number of pixels and the pixel pitch vary depending on notonly conditions of an optical system (sensitivity of the sensor formeasuring the reflected light, etc.), but also on the recording mediumof which type is to be discriminated.

FIG. 8 is a flowchart showing a flow of a recording medium typediscrimination process in this first embodiment.

In step 801 (S801), the intensity of the specular reflection light isdetected. In step S802, image information is created. In step S803,pixels are compared with each other based on the image informationobtained in step S802. Specifically, maximum and minimum brightnessvalues are detected. In step S804, an arithmetic mean value of themaximum and minimum brightness values detected in step S803 iscalculated. In step S805, binary coding is executed using, as athreshold, the arithmetic mean value calculated in step S804. In stepS806, the number of reversals of pixel values, i.e., 0 and 1, iscalculated from an image obtained after the binary coding. In step S807,the type of the recording medium is discriminated based on the intensityof the specular reflection light obtained in step S801 and the number ofreversals of pixel values obtained as a feature variable in step S806.

In the flowchart of the recording medium type discrimination processshown in FIG. 8, the intensity of the specular reflection light isdetected in step S801, i.e., at the beginning of the process flow.However, it is only required that the intensity of the specularreflection light be detected before the type of the recording medium isdiscriminated in step S807.

FIG. 9 is a flowchart showing a process flow for discrimination of thetype of the recording medium in step S807 shown in FIG. 8.

Based on the discrimination map shown in FIG. 9, the type of therecording medium is discriminated using the two obtained parameters asfollows. For this discussion, assume that the values A1, A2, A3, B1, B2and B3 used in the following description satisfy relationships givenbelow. B1, B2 and B3 are values representing the intensity of thespecular reflection light and satisfy a relationship of B1<B2<B3. Also,A1, A2 and A3 are values representing the number of reversals of pixelvalues and satisfy a relationship of A1<A2<A3.

In step 901 (S901), it is determined whether the number of reversals issmaller than A1. If the number of reversals is smaller than A1, theprocess flow advances to step S902, and if not, the process flowadvances to step S905.

In step S902, it is determined whether the intensity of the specularreflection light is smaller than B1. If the intensity of the specularreflection light is smaller than B1, the process flow advances to stepS903, and if not, the process flow advances to step S904. Note that, instep S902, the parameter B1 used for discriminating the type of therecording medium may be replaced by B2 or B3.

In step S903, the type of the recording medium is discriminated to beplain paper. In step S904, the type of the recording medium isdiscriminated to be an OHP film.

In step S905, it is determined whether the number of reversals issmaller than A3. If the number of reversals is smaller than A3, theprocess flow advances to step S906, and if not, the process flowadvances to step S909.

In step S906, it is determined whether the number of reversals issmaller than A2. If the number of reversals is smaller than A2, theprocess flow advances to step S907, and if not, the process flowadvances to step S908. Note that, in step S906, the parameter A2, whichrepresents the number of reversals and is used for discriminating thetype of the recording medium, may be replaced by the parameter B1, whichrepresents the intensity of the specular reflection light.

In step S907, the type of the recording medium is discriminated to beink-jet coated paper. In step S908, the type of the recording medium isdiscriminated to be glossy paper.

In step S909, it is determined whether the intensity of the specularreflection light is smaller than B3. If the intensity of the specularreflection light is smaller than B3, the process flow advances to stepS910, and if not, the process flow advances to step S911.

In step S910, the type of the recording medium is discriminated to bephotographic glossy paper. In step S911, the type of the recordingmedium is discriminated to be a glossy film.

In this embodiment, the processing sequence is set taking into accountthat any type of recording medium is discriminated with thediscriminating process through a comparable number of steps. As analternative, when it is desired to quickly discriminate a particulartype of the recording medium for the reason that the particular type ofthe recording medium is used at higher frequency, the discrimination maybe executed in accordance with a different processing sequence. In sucha case, the type of the recording medium can also be discriminated in asimilar manner based on the discrimination map shown in FIG. 7.

For the areas that are not allocated in FIG. 7 as areas used fordiscriminating the recording medium to be a particular type of recordingmedium, e.g., for the area in which the intensity of the specularreflection light is larger than B1 and the number of reversals is notsmaller than A1, but smaller than A2, the flowchart of FIG. 9 isdesigned so as to discriminate the type of the recording medium to beink-jet coated paper. However, the flowchart may be modified such that,for those areas, the absence of any corresponding type of recordingmedium is discriminated and the process for discriminating the type ofthe recording medium is executed again. As an alternative, errorprocessing to return an error signal indicating the absence of any typeof recording medium may be executed, and an error screen for notifyingthe user of the absence of any type of recording medium may bedisplayed.

FIG. 10 is a schematic perspective view showing one example constructionof a recording apparatus according the first embodiment.

Numeral 1001 denotes a recording apparatus body. In this embodiment, therecording apparatus is assumed to be of the ink-jet type in the form ofa serial printer. As shown in FIG. 10, the recording apparatus comprisesa guide rail 1002, a carriage 1003, an optical sensor 1005, a platen1006, a feed roller 1007, an auto-sheet feeder 1008, and so on.

The guide rail 1002 reciprocally scans the carriage 1003 in thedirection of main scan. The carriage 1003 detachably mounts thereoncartridge-type recording heads 1009, 1010, 1011 and 1012 correspondingto ink tanks of plural colors (e.g., four colors of black (K), cyan (C),magenta (M) and yellow (Y)). Numeral 1004 denotes a recording medium onwhich an image is recorded by the recording apparatus 1001. Fordiscriminating the type of the recording medium, the optical sensor 1005comprises a sensor for measuring the intensity of a specular reflectionlight from the recording medium 1004, and an image sensor for producingimage information regarding a surface of the recording medium 1004. Theplaten 1006 restricts the recording surface of the recording medium 1004to be flat. The feed roller 1007 feeds the recording medium 1004 in thedirection of sub-scan. For the recording medium 1004 fed by the feedroller 1007, the intensity of the specular reflection light is measuredand the image information representing surface conditions is produced.The auto-sheet feeder 1008 supplies and advances the recording medium1004 to a position at which an image is recorded.

The cartridge-type recording heads 1009, 1010, 1011 and 1012 correspondto the ink tanks of plural colors. These recording heads may have anyone of various suitable structures. For example, the recording head maybe separated into an ink tank containing ink as a recording agent andmay be detachably attached to a cartridge body, and the recording headmay be an ink-jet head cartridge supported on the cartridge body and itmay have an ink ejection unit. In other words, the ink ejection unit andthe ink tank may be separable from each other. With the ink ejectionunit and the ink tank being separable from each other, only the ink tankcan be solely replaced, for example, when the amount of ink remaining inthe tank has become small. Alternatively, the structure may be modifiedsuch that only the ink ejection unit is constituted in the form of acartridge and is supplied with ink through a tube or the like from theink tank disposed in another position within the apparatus. It is alsopossible to employ, in addition to the recording heads having theabove-mentioned structure, cartridges corresponding to plural kinds ofink of the same color, but having different densities. Further, aplurality of recording heads corresponding to different recordingdensities may be employed.

As shown in FIG. 10, the recording apparatus can be constructed suchthat the optical sensor 1005 is disposed in the recording apparatus bodyand has an additional function of discriminating the type of therecording medium based on the intensity of the specular reflection lightand the image information, both of which are obtained from the opticalsensor 1005.

FIG. 11 is a functional block diagram of a system configuration.

Numeral 1101 denotes an ink-jet color recording apparatus for forming animage and recording the image on a recording medium P. The colorrecording apparatus 1101 comprises functional blocks 1104 to 1107. Ahost 1102 is connected to the color recording apparatus 1101 andsupplies recording data to be recorded on the recording medium. The host1102 comprises functional blocks 1108 to 1115. Note that, of theconfiguration of the color recording apparatus 1101 and the host 1102,the functions which are regarded as not essential for explaining thefeatures of this embodiment are omitted from the drawing.

A communication interface 1103 interconnects the recording apparatus1101 and the host 1102. While there are various communicationinterfaces, such as IEEE1284, USB (Universal Serial Bus) and IEEE1394,USB is the assumed communication interface in this embodiment.

A recording medium type discrimination unit 1104 discriminates the typeof the recording medium P. From the viewpoint of function, the unit 1104is divided into an image information creating section for detecting theintensity of the specular reflection light from the recording medium Pand creating image information regarding an arbitrary area in a surfaceof the recording medium P with the optical sensor 1005, and a recordingmedium type discrimination section for discriminating the type of therecording medium based on the created image information. The recordingmedium P is stacked in a paper supply tray or cassette equipped in therecording apparatus 1101.

An I/F control unit 1105 fulfills an interface function of the recordingapparatus 1101. Because the interface is assumed to be USB in thisembodiment, the I/F control unit 1105 is constituted by a controller onthe side of a USB peripheral unit. Transmission of information regardingthe type of the recording medium, transmission and reception ofrecording data and control commands, etc. are performed via the I/Fcontrol unit 1105. Also, status information indicating, e.g., an error,and a communication state occurring in the recording apparatus body, arereturned to the host 1102 if requested.

A recording control unit 1106 receives recording data transmitted fromthe host 1102 and develops it in a printer engine. The recording controlunit 1106 controls the printer engine in accordance with recordingcontrol commands contained in the recording data. More specifically, thehost 1102 transmits, as the recording data, data comprising binary datafor recording (or intermediate data before binary coding in some cases)and various commands for controlling the amount of jetted ink, thenumber of passes, the recording direction, and the feed amount of therecording medium.

Numeral 1107 denotes a recording unit that is also called a printerengine. The recording unit 1107 records an image on the recording mediumP in accordance with the recording data developed in the recordingcontrol unit 1106. Since the color recording apparatus 1101 is of theink-jet type, an image is formed with ejection of ink.

An I/F control unit 1108 fulfills an interface function of the host1102. The I/F control unit 1108 is constituted by a controller on theUSB host side and has functions as a USB host. Software, such as an OSand a driver, also constitute part of the USB host functions.

Numeral 1109 denotes a printer driver in the form of software forexecuting, in the host 1102, various settings for recording, creation ofthe recording data, and control of the recording apparatus. The printerdriver 1109 comprises various functional blocks 1110 to 1112.

A recording setting unit 1110 executes various kinds of recordingsettings, such as setting of the recording medium and setting ofrecording quality. The recording setting unit 1110 has functions ofreceiving instructions and inputs from the user and displaying ornotifying details of the setting. The recording setting unit 1110 mayalso have a function of automatically executing the recording settingbased on the information regarding the type of the recording mediumtransmitted from the recording apparatus 1101.

A recording data creating unit 1111 creates the recording data. Morespecifically, in accordance with the recording setting made in therecording apparatus 1101 and the recording setting unit 1110, therecording data creating unit 1111 executes various kinds of imageprocessing, such as color conversion and binary coding, and creates datafor the recording and commands for the recording apparatus to performrecording control. These data for the recording and commands for thecontrol are transmitted as the recording data to the recording apparatus1101.

A table 1112 is used when creating the recording data in the recordingdata creating unit 1111. The table 1112 can be updated or added with newmatter.

A central control unit 1113 controls the various functions of the host1102. From the view of functions, a CPU corresponds to the centralcontrol unit 1113. Numeral 1114 denotes an input operating unit. Theinput operating unit 1114 comprises various input devices used forreflecting the user's intention for the recording setting. A display(notification) unit 1115 informs the recording setting to the user. Therecording setting can be displayed or notified, for example, byemploying a display, such as a monitor, or communicating it with voices.

Thus, the printing system of this embodiment comprises: a colorrecording apparatus which is provided with the optical sensor 1005 andhas the function of discriminating the type of the recording medium; adata processor such as a host which has the function of creating therecording data and the control commands in accordance with instructionsand selections by the user and with the information obtained regardingthe type of the recording medium; and a two-way communication interfaceconnecting the recording apparatus and the data processor. Thisembodiment has been described as an example of a system configuration inwhich the recording apparatus 1101 incorporates all of the functions ofthe recording medium type discriminating unit 1104 (which have beendescribed in detail with reference to FIG. 1). However, a part or all ofthose functions may be incorporated in the data processor, i.e., thehost. With at least a part of those functions incorporated in the dataprocessor, the operation can be performed in a more flexible manner thanwhen processing all of those functions in the recording apparatus body.More specifically, it is possible to easily correct and change theparameters for discriminating the type of the recording medium when anew type of the recording medium is added.

As described above, by obtaining a parameter indicated by the intensityof the specular reflection light from the recording medium and aparameter representing surface conditions of the recording mediumderived from an image of a predetermined area of the recording mediumsurface, and then discriminating the type of the recording medium basedon the obtained parameters, the discrimination of the type of therecording medium can be realized with higher accuracy. Particularly, itis possible to simultaneously realize the discrimination between plainpaper and ink-jet coated paper, which has hitherto been difficult in thecase of employing the reflection optical sensor, and the discriminationbetween photographic glossy paper and a glossy film, which has beendifficult in the past with the use of the image sensor.

While this embodiment employs as the threshold for use in the binarycoding the arithmetic mean value of the maximum and minimum brightnessvalues, similar advantages can also be obtained using another parameterindicating the magnitude of unevenness of the recording medium surface,such as another kind of arithmetic mean value (i.e., a mean valueresulting from summing brightness values of pixels contained in theimage information and dividing the sum by the total number of the pixelsmaking up the image), or the brightness value at a peak of thehistogram.

While this embodiment employs the discrimination parameters 108 indiscriminating the type of the recording medium, similar advantages canalso be obtained by employing a discrimination table in which the typesof recording media are related to the number of reversals of pixelvalues and the intensity of the specular reflection light based on therelationships shown in FIG. 7.

Furthermore, in this embodiment, the number of reversals is provided bycounting both changes from the black pixel to the white pixel and fromthe white pixel to the black pixel. However, similar advantages can alsobe obtained by counting, as the number of reversals, only the changefrom the black pixel to the white pixel or only the change from thewhite pixel to the black pixel.

(Second Embodiment)

A second embodiment implementing the present invention will be describedbelow in detail with reference to the drawings.

While in the first embodiment the type of the recording medium isdiscriminated using the intensity of the specular reflection light andthe number of reversals after the binary coding, a recording mediumdiscriminating method of this second embodiment discriminates the typeof the recording medium by using the intensity of the specularreflection light and a run-length code amount.

FIG. 12 is a functional block diagram showing the recording mediumdiscriminating method according to the second embodiment.

A specular-reflection-light intensity detecting unit detects theintensity of one component of reflected lights from a surface of arecording medium, which is illuminated by a light source, i.e., theintensity of a specular reflection light having reflected at an angle ofreflection equal to an angle of incidence is detected.

An image information creating unit 1202 creates image information froman arbitrary small area of the recording medium surface. A function ofcreating image information from a component of diffuse reflection lightfrom the recording medium performed by the image information creatingunit 1202, requirements for each pixel making up an image, etc. aresimilar to those of the first embodiment.

A maximum/minimum value detecting unit 1203 detects, from the imageinformation made up of a plurality of pixels and obtained in the imageinformation creating unit 1202, maximum and minimum values of brightnessby referring to brightness values of the pixels. The pixels subjected tothe detection of brightness values are all or a part of the pixelsconstituting the above-mentioned image of the small area used for thediscrimination of the recording medium. An arithmetic mean valuecalculating unit 1204 calculates an arithmetic mean value of the maximumand minimum brightness values obtained in the maximum/minimum valuedetecting unit 1203 (i.e., a value resulting from adding the maximum andminimum values and dividing the sum by two).

A binary coding unit 1205 codes the image information obtained in theimage information creating unit 1202 into binary values by employing, asa threshold, the arithmetic mean value obtained in the arithmetic meanvalue calculating unit 1204. A run-length encoding unit 1206 executesrun-length encoding unit 1206 of a binary image (also called binarydata) obtained in the binary coding unit 1205. Details of the run-lengthencoding unit 1206 will be described later with reference to FIG. 13. Acode amount calculating unit 1207 calculates a code amount of the image,which has been encoded in the run-length encoding unit 1206. Details ofthe code amount calculating unit 1206 will be described later withreference to FIG. 13.

A recording medium type discrimination unit 1208 discriminates the typeof the recording medium. The type of the recording medium isdiscriminated from both the intensity of the specular reflection lightobtained in the specular-reflection-light intensity detecting unit 1201and the run-length code amount obtained in the code amount calculatingunit 1207. The discrimination of the type of the recording medium isperformed using a table 1209 for discrimination, which is derived from adiscrimination map prepared in advance and showing the relationships ofvarious types of recording media versus the intensity of the specularreflection light and the run-length code amount. Details of a method fordiscriminating the type of the recording medium will be described below.Numeral 1209 denotes a table for discrimination, which is used indiscriminating the type of the recording medium in the recording mediumtype discrimination unit 1208. In the table 1209 for discrimination,various types of recording media are related to the run-length codeamount and the intensity of the specular reflection light.

Thus, the process flow comprises the steps of detecting the intensity ofthe specular reflection light from the recording medium, calculating therun-length code amount from the image information of the arbitrary smallarea of the recording medium surface, and then discriminating the typeof the recording medium based on those results.

FIGS. 13A and 13B are representations for explaining run-length encodingexecuted in the run-length encoding unit 1206 and the code amountobtained in the code amount calculating unit 1207 shown in FIG. 12. Itis assumed in FIGS. 13A and 13B that the image to be processed is givenas information of a one-dimensional linear image.

FIG. 13A shows an example in which the run length is short. Numeral 1301denotes a pixel at a certain position in an image after the binarycoding. The pixel 1301 is a black pixel and has a value of 0. Also,numeral 1302 denotes a pixel at the 20-th position counted from thepixel 1301 at a certain position. The pixel 1302 is a white pixel andhas a value of 1. FIG. 13B shows an example in which the run length islong. Numeral 1303 denotes a pixel at a certain position in an imageafter the binary coding. The pixel 1303 is a black pixel and has a valueof 0. Also, numeral 1304 denotes a pixel at the 20-th position countedfrom the pixel 1303 at a certain position. The pixel 1303 is a blackpixel and has a value of 0. In any of FIGS. 13A and 13B, the image afterthe binary coding is constituted by an array of white and black pixels.The white and black pixels are in fact pixels each having a value of 0or 1.

The run-length encoding is now briefly described. The run-lengthencoding is an encoding scheme primarily used in facsimile machines, forexample, in which, when the same data element frequently appears incontinuation, attention is focused on a combination of that data elementand the number of times which that data element appears. Codes areallocated such that a smaller code amount is allocated to a combinationthat frequently appears, and a larger code amount is allocated to acombination that rarely appears. As a result, a total code amount can bereduced. This second embodiment utilizes the fact that, by calculatingthe run-length code amount, a brightness difference and a period ofchanges in brightness among a plurality of pixels making up an image canbe confirmed. In other words, features of surface roughness and surfaceshape of the recording medium can be obtained from the run-length codeamount.

First, a description is made of FIG. 13A. In FIG. 13A, codes areallocated by using terminating codes for MH (Modified Huffman) codingthat is used in facsimile machines. For example, when there is one blackpixel alone, 3 bits of 010 are allocated. Likewise, when there is onewhite pixel alone, 6 bits of 000111 are allocated. Thus, by employingthe encoding scheme in which a larger code amount is allocated to theimage information in which the run length of pixels having the samevalue is short, i.e., the image information representing a shorterperiod of changes in the brightness value, a larger code amount than 21pixels, which is the number of pixels to be processed, is allocated asshown in FIG. 13A. Generally, because 1 bit is required to indicate astate of each pixel in the binary image, 21 pixels can be expressedusing 21 bits. However, when the run-length encoding is applied to datain which combinations of pixels of respective values continue withrepetition of a shorter run length, as shown in FIG. 13A, a very largecode amount of 45 bits is allocated.

Next, a description is made of FIG. 13B. In FIG. 13B, as with FIG. 13A,codes are allocated by using terminating codes for the MH (ModifiedHuffman) coding. For example, 0011 is allocated when five black pixelscontinue, 1111 is allocated when seven white pixels continue, and 000100is allocated when nine black pixels continue. Thus, it is understoodthat, by allocating smaller code amounts to the image informationrepresenting a longer period of changes in the brightness value, thecode amount representing 21 pixels shown in FIG. 13B is given by 14bits, i.e., a value smaller than the number of pixels (21) to beprocessed.

Thus, by applying the run-length encoding to an array of pixels, it ispossible to precisely and clearly confirm not only a tendency inrespective numbers of white pixels and black pixels, but also an indexrepresenting continuation of pixels having the same value, the indexbeing given by whether the run length is short or long.

While this embodiment employs the Huffman coding as one example of therun-length encoding, codes can be allocated with any other suitablespecific coding to match with the number and tendency of pixels of theimage to be processed. Also, what is here required is not a bit stringafter the coding, but an index representing the run length. Therefore,the intended function can be sufficiently realized merely by allocatingthe code amount, i.e., the number of bits, to a particular run lengthwithout allocating a terminating code to the particular run length.

In this embodiment of the present invention, two kinds of features ofthe recording medium surface are obtained as parameters, and the type ofthe recording medium is discriminated based on these parameters. Bymeasuring the intensity of the specular reflection light describedabove, the feature regarding the magnitude of unevenness of therecording medium surface is obtained. Also, by calculating therun-length code amount corresponding to changes in brightnessinformation in accordance with an array of successive pixels, thefeature regarding the period of unevenness of the recording mediumsurface is obtained. Herein, the magnitude of unevenness of therecording medium surface is referred to as a “smoothness or glossfeature”, and the period of unevenness of the recording medium surfaceis referred to as a “surface shape feature”. A manner of discriminatingthe type of the recording medium based on those two features will bedescribed below.

FIG. 14 is a discrimination map showing the relationships of varioustypes of recording media versus the run-length code amount and theintensity of the specular reflection light. Circular regions in FIG. 14each represent a set of points corresponding to the measured results,and discrimination areas are defined by dividing a map plane as shownbased on the circular regions.

Numeral 1401 represents an area in which the recording medium undermeasurement is discriminated to be plain paper. Numeral 1402 representsan area in which it is discriminated to be ink-jet coated paper. Numeral1403 represents an area in which it is discriminated to be glossy paper.Numeral 1404 represents an area in which it is discriminated to bephotographic glossy paper. Numeral 1405 represents an area in which itis discriminated to be a glossy film. Numeral 1406 represents an area inwhich it is discriminated to be an OHP film.

The above-described relationships of the various types of recordingmedia versus the run-length code amount and the intensity of thespecular reflection light are summarized in Table 4 given below.

TABLE 4 Photo- graphic Plain Coated Glossy glossy Glossy OHP paper paperpaper paper film film (a) (b) (c) (d) (e) (f) Specular low low mediumhigh higher higher reflection than (d) than (d) light intensityRun-length small medium large larger larger hardly code than (c) than(c) appre- amount ciable

As seen from Table 4, the run-length code amount shows a similartendency to that of the number of reversals in the first embodiment.

FIG. 15 is a flowchart of a recording medium type discrimination processin this second embodiment.

In step 1501 (S1501), the intensity of the specular reflection light isdetected. In step S1502, image information is created. In step S1503,pixels are compared with each other based on the image informationobtained in step S1502. Specifically, maximum and minimum brightnessvalues are detected. In step S1504, an arithmetic mean value of themaximum and minimum brightness values detected in step S1503 iscalculated. In step S1505, binary coding is executed using, as athreshold, the arithmetic mean value calculated in step S1504. In stepS1506, the run-length encoding is executed on an image obtained afterthe binary coding. In step S1507, the code amount resulting from therun-length encoding is calculated. In step S1508, the type of therecording medium is discriminated based on the intensity of the specularreflection light obtained in step S1501 and the run-length code amountobtained as a feature variable in step S1507.

In the flowchart of the recording medium type discrimination processshown in FIG. 15, the intensity of the specular reflection light isdetected in step S1501, i.e., at the beginning of the process flow.However, it is only required that the intensity of the specularreflection light be detected before the type of the recording medium isdiscriminated in step S1508.

FIG. 16 is a discrimination table used for the type of the recordingmedium in step S1508 of FIG. 15. This discrimination table is preparedbased on the discrimination map shown in FIG. 14.

Numeral 1601 represents an area in which the recording medium undermeasurement is discriminated to be plain paper. Numeral 1602 representsan area in which it is discriminated to be ink-jet coated paper. Numeral1603 represents an area in which it is discriminated to be glossy paper.Numeral 1604 represents an area in which it is discriminated to bephotographic glossy paper. Numeral 1605 represents an area in which itis discriminated to be a glossy film. Numeral 1606 represents an area inwhich it is discriminated to be an OHP film.

With this second embodiment, as with the first embodiment, featuresindicated by the intensity of the specular reflection light from therecording medium and representing surface conditions of the recordingmedium from an image of a predetermined area of the recording mediumsurface are obtained, and the type of the recording medium isdiscriminated based on the obtained features. By employing therun-length code amount when discriminating the type of the recordingmedium, the difference in the surface conditions of the recording mediumcan be made more noticeable, and the accuracy in discriminating the typeof the recording medium can be improved. To that end, it is alsopossible to execute optimization so that codes are allocated based on astatistical process of an appearance pattern of the run length. With theoptimization, the discrimination can be made using an index that enablesthe intention on the discriminating side, i.e., the intention of theuser, to be more precisely reflected upon image features than theparameter obtained by totaling the number of recesses and projections inthe uneven surface, e.g., the number of reversals used the firstembodiment. Further, coarse and dense patterns in the pixel array canalso be confirmed by paying attention to combinations of white and blackrun lengths.

Also, by employing the run-length code amount, an allowance error forthe focal length of the image sensor can be increased. The reason isthat, even if the distance between the image sensor and the recordingmedium is slightly changed and a blurred image results because of afocusing deviation, the effect of the focusing deviation can bealleviated because the run-length coding is applied to an image afterthe binary coding.

While this embodiment employs, as the threshold for use in the binarycoding, the arithmetic mean value of the maximum and minimum brightnessvalues, similar advantages can also be obtained using another parameterindicating the magnitude of unevenness of the recording medium surface,such as another kind of arithmetic mean value obtained from all thepixels, or the brightness value at a peak of the histogram.

While this embodiment employs the discrimination table 1209 indiscriminating the type of the recording medium, similar advantages canalso be obtained by employing a threshold based on distributionsmeasured for the run-length code amount and the intensity of thespecular reflection light of the various types of recording media.

(Third Embodiment)

A third embodiment implementing the present invention will be describedbelow in detail with reference to the drawings.

A recording medium type discriminating method realizing this thirdembodiment is featured in discriminating the type of the recordingmedium based on the intensity of the specular reflection light and thenumber of isolated pixels. A process flow and a discrimination flow aresubstantially the same as those in the first embodiment, and hence adescription thereof is omitted here.

FIG. 17 is a functional block diagram showing the recording mediumdiscriminating method according to the third embodiment.

A specular-reflection-light intensity detecting unit 1701 detects theintensity of one component of reflected lights from a surface of arecording medium, which is illuminated by a light source, i.e., theintensity of a specular reflection light having reflected at an angle ofreflection equal to an angle of incidence is detected.

An image information creating unit 1702 creates image information froman arbitrary small area of the recording medium surface. A function ofcreating the image information from a component of diffuse reflectionlight from the recording medium performed by the image informationcreating unit 1702, requirements for each pixel making up an image, etc.are similar to those of the first embodiment.

A maximum/minimum value detecting unit 1703 detects, from the imageinformation made up of a plurality of pixels and obtained in the imageinformation creating unit 1702, maximum and minimum values of brightnessby referring to brightness values of the pixels. The pixels subjected tothe detection of brightness values are all or a part of the pixelsconstituting the above-mentioned image of the small area used for thediscrimination of the recording medium. An arithmetic mean valuecalculating unit 1704 calculates an arithmetic mean value of the maximumand minimum brightness values obtained in the maximum/minimum valuedetecting unit 1703 (i.e., a value resulting from adding the maximum andminimum values and dividing the sum by two).

A binary coding unit 1705 codes the image information obtained in theimage information creating unit 1702 into binary values by employing, asa threshold, the arithmetic mean value obtained in the arithmetic meanvalue calculating unit 1704. A number-of-isolated pixels calculatingunit 1706 calculates the number of isolated pixels, i.e., the number ofpixels that are determined to be isolated pixels from values of adjacentpixels on both sides of the isolated pixel based on a binary image (alsocalled binary data) obtained in the binary coding unit 1705. Details ofthe number-of-isolated pixels calculating unit 1706 will be describedlater with reference to FIG. 18.

A recording medium type discrimination unit 1707 discriminates the typeof the recording medium. The type of the recording medium isdiscriminated from both the intensity of the specular reflection lightobtained in the specular-reflection-light intensity detecting unit 1701and the number of isolated pixels obtained in the number-of-isolatedpixel calculating unit 1706. The discrimination of the type of therecording medium is performed using parameters 1708 for discrimination,which are derived from a discrimination map prepared in advance andshowing the relationships of various types of recording media versus theintensity of the specular reflection light and the number of isolatedpixels. Numeral 1708 denotes parameters for discrimination, which areused in discriminating the type of the recording medium in the recordingmedium type discrimination unit 1707, i.e., thresholds decided based ondistributions measured for the various types of recording media.

Thus, the process flow comprises the steps of detecting the intensity ofthe specular reflection light from the recording medium, calculating thenumber of isolated pixels from the image information of the arbitrarysmall area of the recording medium surface, and then discriminating thetype of the recording medium based on those results.

FIG. 18 is a representation for explaining the number of isolated blackor white pixels after the binary coding executed in thenumber-of-isolated pixels calculating unit 1706 shown in FIG. 17. It isassumed in FIG. 18 that the image to be processed is given asinformation of a one-dimensional linear image.

Numeral 1801 denotes a pixel at a certain position in an image after thebinary coding. The pixel 1801 is a black pixel and has a value of 0.Also, numeral 1802 denotes a pixel at the 20-th position counted fromthe pixel 1801 at a certain position. The pixel 1802 is a white pixeland has a value of 1. In the image shown in FIG. 18, there are somepositions where the pixels on both sides of a certain black or whitepixel are reversed to white or black pixels. A pixel at such a positionis referred to as an isolated pixel. In this embodiment, the number ofisolated pixels is employed as one of parameters for use indiscriminating the type of the recording medium. The isolated blackpixels, each having a value of 0, are a pixel 1803 at the seventhposition and a pixel 1804 at the 18-th position counted from the pixel1801. Also, taking a white pixel as a predetermined target pixel, theisolated white pixels are a pixel 1805 at the first position, a pixel1806 at the eighth position, and a pixel 1807 at the 17-th positioncounted from the pixel 1801.

Assuming that the number of black isolated pixels before the pixel 1801is N, since there are two black isolated pixels between the pixels 1801and 1802, the number of black isolated pixels before the pixel 1802 is(N+2). Similarly, assuming that the number of white isolated pixelsbefore the pixel 1805 is M, since there are two white isolated pixelsbetween the pixels 1805 and 1802, the number of white isolated pixelsbefore the pixel 1802 is (M+2).

The isolated pixels frequently appear in an area of the image in whichbrightness abruptly changes. Also, the isolated pixels noticeably appearin a recording medium having a higher smoothness and a smaller period ofsurface unevenness, such as glossy paper or a glossy film. In thoserecording media, therefore, the number of isolated pixels is increased.Conversely, in a recording medium having moderate changes in surfaceasperities, such as plain paper, pixels having the same value (e.g.,black pixels) tend to continue, and hence the number of isolated pixelsis reduced.

In this embodiment of the present invention, two kinds of features ofthe recording medium surface are obtained as parameters, and the type ofthe recording medium is discriminated based on the parameters. Bymeasuring the intensity of the specular reflection light describedabove, the feature regarding the magnitude of unevenness of therecording medium surface is obtained. Also, by measuring the number ofisolated pixels corresponding to changes in brightness information inaccordance with an array of successive pixels, the feature regarding theperiod of unevenness of the recording medium surface is obtained.Herein, the magnitude of unevenness of the recording medium surface isreferred to as a “smoothness or gloss feature”, and the period ofunevenness of the recording medium surface is referred to as a “surfaceshape feature”. A manner of discriminating the type of the recordingmedium based on those two features will be described below.

FIG. 19 is a discrimination map showing the relationships of varioustypes of recording media versus the number of isolated pixels and theintensity of the specular reflection light.

Values denoted by A1 to A3, B1 and B2 in FIG. 19 are used as theparameters 1708 for discrimination shown in FIG. 17. Circular regions inFIG. 19 each represent a set of points corresponding to the measuredresults, and discrimination areas are defined by dividing a map plane asshown based on the circular regions.

Numeral 1901 represents an area in which the recording medium undermeasurement is discriminated to be plain paper. Numeral 1902 representsan area in which it is discriminated to be ink-jet coated paper. Numeral1903 represents an area in which it is discriminated to be glossy paper.Numeral 1904 represents an area in which it is discriminated to bephotographic glossy paper. Numeral 1905 represents an area in which itis discriminated to be a glossy film. Numeral 1906 represents an area inwhich it is discriminated to be an OHP film.

The above-described relationships of the various types of recordingmedia versus the number of isolated pixels and the intensity of thespecular reflection light are summarized in Table 5 given below.

TABLE 5 Photo- graphic Plain Coated Glossy glossy Glossy OHP paper paperpaper paper film film (a) (b) (c) (d) (e) (f) Specular low low mediumhigh higher higher reflection than (d) than (d) light intensity Numberof small medium large larger larger hardly isolated than (c) than (c)appre- pixels ciable

As seen from Table 5, the number of isolated pixels shows a similartendency to the number of reversals in the first embodiment and therun-length code amount in the second embodiment.

With this third embodiment, as with the first and second embodiments, aparameter indicated by the intensity of the specular reflection lightfrom the recording medium and a parameter representing surfaceconditions of the recording medium and derived from an image of apredetermined area of the recording medium surface are obtained, and thetype of the recording medium is discriminated based on these obtainedparameters. By employing the number of isolated pixels whendiscriminating the type of the recording medium, similar advantages canbe realized with the process having a simpler system configuration andimposing a smaller load on the control system than the case ofcalculating the code amount with the run-length encoding in the secondembodiment. Also, by employing the number of isolated pixels, similaradvantages can be obtained with basically the same system configurationas that of the first embodiment in which the number of reversals ofpixel values is calculated. In this regard, the number of discriminationparameters can be increased by one by paying attention to each of thewhite and black isolated pixels.

While this embodiment employs, as the threshold for use in the binarycoding, the arithmetic mean value of the maximum and minimum brightnessvalues, similar advantages can also be obtained using another parameterindicating the magnitude of unevenness of the recording medium surface,such as another kind of arithmetic mean value obtained from all thepixels, or the brightness value at a peak of the histogram.

While this embodiment employs the discrimination parameters 1708 indiscriminating the type of the recording medium, similar advantages canalso be obtained by employing a discrimination table in which the typesof recording media are related to the number of isolated pixels and theintensity of the specular reflection light, as explained in the secondembodiment.

(Fourth Embodiment)

A fourth embodiment implementing the present invention will be describedbelow in detail with reference to the drawings.

A recording medium type discriminating method realizing this fourthembodiment is featured in discriminating the type of the recordingmedium based on the intensity of the specular reflection light and thenumber of reversals of positive and negative signs of brightness valuesbetween adjacent pixels. The following description is made of primarilythat latter feature of this fourth embodiment. A process flow and adiscrimination flow are substantially the same as those in the firstembodiment, and hence a description thereof is omitted here.

FIG. 20 is a functional block diagram showing the recording mediumdiscriminating method according to the fourth embodiment.

A specular-reflection-light intensity detecting unit 2001 detects theintensity of one component of reflected lights from a surface of arecording medium, which is illuminated by a light source, i.e., theintensity of a specular reflection light having reflected at an angle ofreflection equal to an angle of incidence is detected.

An image information creating unit 2002 creates image information froman arbitrary small area of the recording medium surface. A function ofcreating the image information from a component of diffuse reflectionlight from the recording medium performed by the image informationcreating unit 2002, requirements for each pixel making up an image, etc.are similar to those of the first embodiment.

Numeral 2003 denotes a unit for calculating a brightness differencebetween adjacent pixels, which calculates the brightness differencebetween adjacent pixels from the image information obtained in the imageinformation creating unit 2002. Details of the unit 2003 for calculatinga brightness difference between adjacent pixels will be described laterwith reference to FIG. 21. Numeral 2004 denotes a unit for calculatingthe number of reversals of positive and negative signs, which findssigns of the brightness difference obtained in the unit 2003 forcalculating a brightness difference between adjacent pixels and adds thenumber of times the sign is reversed from positive to negative ornegative to positive. Details of the unit 2004 for calculating thenumber of reversals of positive and negative signs will also bedescribed later with reference to FIG. 21.

A recording medium type discrimination unit 2005 discriminates the typeof the recording medium. The type of the recording medium isdiscriminated from both the intensity of the specular reflection lightobtained in the specular-reflection-light intensity detecting unit 2001and the number of reversals of positive and negative signs obtained inthe unit 2004 for calculating the number of reversals of positive andnegative signs. The discrimination of the type of the recording mediumis performed using parameters 2006 for discrimination, which are derivedfrom a discrimination map prepared in advance and showing therelationships of various types of recording media versus the intensityof the specular reflection light and the number of reversals of positiveand negative signs. Numeral 2006 denotes parameters for discrimination,which are used in discriminating the type of the recording medium in therecording medium type discriminating unit 2005, i.e., thresholds decidedbased on distributions measured for the various types of recordingmedia.

Thus, the process flow comprises the steps of detecting the intensity ofthe specular reflection light from the recording medium, calculating thenumber of reversals of positive and negative signs from the imageinformation of the arbitrary small area of the recording medium surface,and then discriminating the type of the recording medium based on thoseresults.

FIG. 21 is a representation for explaining the number of reversals ofpositive and negative signs of the brightness difference betweenadjacent pixels, which is calculated in a combination of the unit 2003for calculating a brightness difference between adjacent pixels and theunit 2004 for calculating the number of reversals of positive andnegative signs, both shown in FIG. 20. It is assumed in FIG. 21 that theimage to be processed is given as information of a one-dimensionallinear image. Also, it is assumed that each pixel has an 8-bitbrightness data.

Numeral 2101 denotes a pixel at a certain position in an image and has abrightness value of 98. Also, numeral 2102 denotes a pixel at the 20-thposition counted from the pixel 2101 at a certain position and has abrightness value of 137.

The unit 2003 for calculating a brightness difference between adjacentpixels, shown in FIG. 20, calculates the brightness difference between arelevant pixel and an adjacent pixel on the right side as viewed in FIG.20. Assuming that an m-th pixel has a brightness value of Y_(m) and anadjacent (m+1)-th pixel has a brightness value of Y_(m+1), thebrightness difference between adjacent pixels is given by Y_(m+1)−Y_(m).For example, the brightness difference between the pixel 2101 at aposition of m=n and an adjacent pixel (having a brightness value of 130)on the right side as viewed in FIG. 20 is given by 130−98=+32. Likewise,the brightness differences between subsequent adjacent pixels arecalculated as −20, −19, +13, and so on. Looking at signs of thebrightness differences thus obtained, the signs of the brightnessdifferences between the pixel 2101 and the adjacent pixel, between anext pair of adjacent pixels, and so on are positive, negative,negative, positive, and so on. Then, the unit 2004 for calculating thenumber of reversals of positive and negative signs, shown in FIG. 20,calculates the number of reversals of positive and negative signs, i.e.,the number of times the sign is changed from positive to negative andthe number of times the sign is changed from negative to positive.

In FIG. 21, each arrow in an upper stage indicates a boundary positionbetween adjacent pixels for which the brightness difference iscalculated, and a symbol (+or −) under the arrow represents a sign ofthe brightness difference, and each arrow in a lower stage indicates apoint at which the sign is changed from positive to negative or fromnegative to positive.

Assuming that the number of reversals of positive and negative signsbefore the pixel 2101 is (N−1), since the sign is reversed eleven (11)times, which corresponds to the number of arrows in the lower stagebetween the pixels 2101 and 2102, the number of reversals of positiveand negative signs can be obtained by adding the number of those arrows.In the illustrated case, the number of reversals of positive andnegative signs before the pixel 2102 is (N+10).

In this fourth embodiment, on condition that each pixel has amulti-value data, the number of reversals of positive and negative signsis used as a parameter for discriminating the type of the recordingmedium. When the multi-value data is converted into binary data, thebinary data shows a similar tendency to that of the number of reversalsof pixel values after the binary coding in the first embodiment. Statedanother way, calculating the number of reversals of positive andnegative signs can be said to be one of methods for extracting from theimage information the index indicating changes in asperities, whichrepresent one of the features of the surface shape of the recordingmedium. By executing the above-described process while holding themulti-value data greater than a one-bit value, it is possible to confirma tendency of even relatively small changes in the surface shape of therecording medium, which cannot be regarded as reversals of the pixelvalue after the binary coding.

In this embodiment of the present invention, two kinds of features ofthe recording medium surface are obtained as parameters, and the type ofthe recording medium is discriminated based on the parameters. Bymeasuring the intensity of the specular reflection light describedabove, the feature regarding the magnitude of unevenness of therecording medium surface is obtained. Also, by measuring the number ofreversals of positive and negative signs corresponding to changes inbrightness information in accordance with an array of successive pixels,the feature regarding the period of unevenness of the recording mediumsurface is obtained. Herein, the magnitude of unevenness of therecording medium surface is referred to as a “smoothness or glossfeature”, and the period of unevenness of the recording medium surfaceis referred to as a “surface shape feature”. A manner of discriminatingthe type of the recording medium based on those two features will bedescribed below.

FIG. 22 is a discrimination map showing the relationships of varioustypes of recording media versus the number of reversals of positive andnegative signs and the intensity of the specular reflection light.Values denoted by A1 to A3, B1 and B2 in FIG. 22 are used as theparameters 2006 for discrimination shown in FIG. 20. Circular regions inFIG. 22 each represent a set of points corresponding to the measuredresults, and discrimination areas are defined by dividing a map plane asshown based on the circular regions.

Numeral 2201 represents an area in which the recording medium undermeasurement is discriminated to be plain paper. Numeral 2202 representsan area in which it is discriminated to be ink-jet coated paper. Numeral2203 represents an area in which it is discriminated to be glossy paper.Numeral 2204 represents an area in which it is discriminated to bephotographic glossy paper. Numeral 2205 represents an area in which itis discriminated to be a glossy film. Numeral 2206 represents an area inwhich it is discriminated to be an OHP film.

The above-described relationships of the various types of recordingmedia versus the number of reversals of positive and negative signs andthe intensity of the specular reflection light are summarized in Table 6given below.

TABLE 6 Photo- graphic Plain Coated Glossy glossy Glossy OHP paper paperpaper paper film film (a) (b) (c) (d) (e) (f) Specular low low mediumhigh higher higher reflection than (d) than (d) light intensity numberof small medium large larger larger hardly reversals of than (c) than(c) appre- (+) and (−) ciable signs

As seen from Table 6, the number of reversals of positive and negativesigns shows a similar tendency to those of the number of reversals afterthe binary coding in the first embodiment, the run-length code amount inthe second embodiment, and the number of isolated pixels in the thirdembodiment.

With this fourth embodiment, as with the first, second and thirdembodiments, a feature indicated by the intensity of the specularreflection light from the recording medium and a feature representingsurface conditions of the recording medium and derived from an image ofa predetermined area of the recording medium surface are obtained, andthe type of the recording medium is discriminated based on the obtainedfeatures. By employing the number of reversals of positive and negativesigns when discriminating the type of the recording medium, it ispossible to employ, as an index for discrimination, smaller changes inbrightness than those in the case of using the parameters extractedafter the binary coding, such as the number of reversals, as is done inthe first to third embodiments.

While this embodiment employs the discrimination parameters 2006 indiscriminating the type of the recording medium, similar advantages canalso be obtained by employing a discrimination table in which the typesof recording media are related to the number of reversals of positiveand negative signs and the intensity of the specular reflection light asexplained in the second embodiment.

While in this embodiment the number of reversals of positive andnegative signs is given as the sum of the number of times the sign isreversed from positive to negative and the number of times the sign isreversed from negative to positive, similar advantages can also beobtained by employing only the number of times the sign is reversed frompositive to negative or only the number of times the sign is reversedfrom negative to positive.

Further, in this embodiment, the brightness difference between adjacentpixels is calculated and a sign is assigned depending on the calculatedbrightness difference. However, variations and errors caused in the stepof creating the image information can be absorbed by additionallyexecuting a process in which a threshold is employed when assigning asign depending on the brightness difference, i.e., a process foradjusting sensitivity.

(Fifth Embodiment)

A fifth embodiment implementing the present invention will be describedbelow in detail with reference to the drawings.

A recording medium type discriminating method of this fifth embodimentis featured in discriminating the type of the recording medium based onthe intensity of the specular reflection light and the number of pixelsat a histogram peak. The following description is made of primarily thatlatter feature of this fifth embodiment.

FIG. 23 is a functional block diagram showing the recording mediumdiscriminating method according to the fifth embodiment.

A specular-reflection-light intensity detecting unit 2301 detects theintensity of one component of reflected lights from a surface of arecording medium which is illuminated by a light source, i.e., theintensity of a specular reflection light having reflected at an angle ofreflection equal to an angle of incidence is detected.

An image information creating unit 2302 creates image information froman arbitrary small area of the recording medium surface. A function ofcreating the image information from a component of diffuse reflectionlight from the recording medium performed by image information creatingunit 2302, requirements for each pixel making up an image, etc. aresimilar to those of the first embodiment.

A histogram calculating unit 2303 calculates a histogram from the imageinformation made up of a plurality of pixels and obtained in the imageinformation creating unit 2302. Details of the histogram calculatingunit 2303 will be described later with reference to FIG. 24. Anumber-of-peak (value) pixels calculating unit 2304 detects a brightnessvalue at a peak of the histogram obtained in the histogram calculatingunit 2303, and then calculates the number of pixels at the peak. Detailsof the number-of-peak pixels calculating unit 2304 will also bedescribed later with reference to FIG. 24.

A recording medium type discrimination unit 2305 discriminates the typeof the recording medium. The type of the recording medium isdiscriminated from both the intensity of the specular reflection lightobtained in the specular-reflection-light intensity detecting unit 2301and the number of peak pixels obtained in the number-of-peak pixelscalculating unit 2304. The discrimination of the type of the recordingmedium is performed using parameters 2306 for discrimination, which arederived in advance and show the relationships of various types ofrecording media versus the intensity of the specular reflection lightand the number of peak pixels. Numeral 2306 denotes parameters fordiscrimination, which are used in discriminating the type of therecording medium in the recording medium type discrimination unit 2305,i.e., thresholds decided based on distributions measured for the varioustypes of recording media are used to discriminate the type of recordingmedium.

Thus, the process flow comprises the steps of detecting the intensity ofthe specular reflection light from the recording medium, calculating thenumber of peak pixels from the image information of the arbitrary smallarea of the recording medium surface, and then discriminating the typeof the recording medium based on those results.

FIG. 24 shows histograms of the various types of recording media. Thehorizontal axis represents brightness and the vertical axis representsthe number of pixels having each value of the brightness. Each of thehistograms shown in FIG. 24 is prepared by accumulating the number ofpixels having a predetermined value of brightness in the histogramcalculating unit 2303 based on the image information obtained in theimage information creating unit 2302.

Numeral 2401 represents a histogram for plain paper. Numeral 2402represents a histogram for ink-jet coated paper. Numeral 2403 representsa histogram for glossy paper. Numeral 2404 represents a histogram forphotographic paper. Numeral 2405 represents a histogram for a glossyfilm. Numeral 2406 represents a histogram for an OHP film.

In this embodiment of the present invention, two kinds of features ofthe recording medium surface are obtained as parameters, and the type ofthe recording medium is discriminated based on these parameters. Bymeasuring the intensity of the specular reflection light and the numberof peak pixels resulting from a statistical process as described above,the features regarding the magnitude of unevenness of the recordingmedium surface are obtained. Herein, the magnitude of unevenness of therecording medium surface obtained from the intensity of the specularreflection light is referred to as a “smoothness or gloss feature”, andthe magnitude of unevenness of the recording medium surface obtainedfrom the number of peak pixels is referred to as a “surface roughnessfeature”. A manner of discriminating the type of the recording mediumbased on these two features will be described below.

A description is now briefly made of relationships between features ofthe six types of recording media to be detected in this embodiment andhistograms.

Plain paper has a large magnitude of unevenness, which appears as adensity difference in the image information, and therefore the histogram2401 has broad distribution as shown. As a result, the plain paperprovides a smaller number of peak pixels than the other types ofrecording media. Also, the peak brightness value of plain paper tends tohave a relatively small value. The reason is that the peak brightnessvalue shows substantially the same tendency as the degree of whitenessof the recording medium.

Ink-jet coated paper has a smaller magnitude of unevenness than plainpaper, and therefore the histogram has a narrower distribution widththan plain paper. Correspondingly, the ink-jet coated paper shows alarger number of peak pixels than plain paper. Also, the peak brightnessvalue of ink-jet coated paper is substantially the same as that of plainpaper in many cases.

Glossy paper has a narrower histogram distribution width and a largernumber of peak pixels than ink-jet coated paper. Also, the peakbrightness value of glossy paper is larger than those of plain paper andink-jet coated paper.

Photographic glossy paper and a glossy film show substantially the sametendency as glossy paper, but they have an even narrower histogramdistribution width and an even larger number of peak pixels. It isdifficult to discriminate photographic glossy paper and glossy filmbased on their histograms.

Since an OHP film is formed so as to have substantially the samebrightness value over its entire surface, the histogram distributionwidth is extremely narrow and it has the greatest number of peak pixelsof the recording media to be detected. Most of a light illuminated froma light source passes through the recording medium, and hence the OHPfilm tends to show a minimum peak brightness value.

FIG. 25 is a discrimination map showing the relationships of varioustypes of recording media versus the number of peak pixels and theintensity of the specular reflection light. Circular regions in FIG. 25each represent a set of points corresponding to the measured results,and discrimination areas are defined by dividing a map plane as shownbased on the circular regions.

Numeral 2501 represents an area in which the recording medium undermeasurement is discriminated to be plain paper. Numeral 2502 representsan area in which it is discriminated to be ink-jet coated paper. Numeral2503 represents an area in which it is discriminated to be glossy paper.Numeral 2504 represents an area in which it is discriminated to bephotographic glossy paper. Numeral 2505 represents an area in which itis discriminated to be a glossy film. Numeral 2506 represents an area inwhich it is discriminated to be an OHP film.

The above-described relationships of the various types of recordingmedia versus the number of peak pixels and the intensity of the specularreflection light are summarized in Table 7 given below.

TABLE 7 Photo- graphic Plain Coated Glossy glossy Glossy OHP paper paperpaper paper film film (a) (b) (c) (d) (e) (f) Specular low low mediumhigh higher higher reflection than (d) than (d) light intensity Numberof small medium large larger larger larger peak than (c) than (c) thanpixels (d), (e)

FIG. 26 is a flowchart showing a flow of a recording medium typediscriminating process in this fifth embodiment.

In step 2601 (S2601), the intensity of the specular reflection light isdetected. In step S2602, image information is created. In step S2603, ahistogram is created from the image information obtained in step S2602.In step S2604, a brightness value at a peak of the histogram created instep S2603 is detected, and the number of pixels at the peak iscalculated. In step S2605, the type of the recording medium isdiscriminated based on the intensity of the specular reflection lightobtained in step S2601 and the number of peak pixels obtained as afeature variable in step S2604.

In the flowchart of the recording medium type discriminating processshown in FIG. 26, the intensity of the specular reflection light isdetected in step S2601, i.e., at the beginning of the process flow.However, it is only required that the intensity of the specularreflection light be detected before the type of the recording medium isdiscriminated in step S2605.

FIG. 27 is a flowchart showing a process flow for discrimination of thetype of the recording medium in step S2605 shown in FIG. 26.

Based on the discrimination map shown in FIG. 25, the type of therecording medium is discriminated using the two obtained parameters asfollows. For the following discussion, assume that the values A1, A2,A3, A4, B1 and B2 satisfy relationships given below. B1 and B2 arevalues representing the intensity of the specular reflection light andsatisfy a relationship of B1<B2. Also, A1, A2, A3 and A4 are valuesrepresenting the number of peak pixels and satisfy a relationship ofA1<A2<A3<A4.

In step 2701 (S2701), it is determined whether the intensity of thespecular reflection light is smaller than B1. If the intensity of thespecular reflection light is smaller than B1, the process flow advancesto step S2702, and if not, the process flow advances to step S2705.

In step S2702, it is determined whether the number of peak pixels issmaller than A1. If the number of peak pixels is smaller than A1, theprocess flow advances to step S2703, and if not, the process flowadvances to step S2704.

In step S2703, the type of the recording medium is discriminated to beplain paper. In step S2704, the type of the recording medium isdiscriminated to be ink-jet coated paper.

In step S2705, it is determined whether the intensity of the specularreflection light is smaller than B2. If the intensity of the specularreflection light is smaller than B2, the process flow advances to stepS2706, and if not, the process flow advances to step S2709.

In step S2706, it is determined whether the number of peak pixels issmaller than A3. If the number of peak pixels is smaller than A3, theprocess flow advances to step S2707, and if not, the process flowadvances to step S2708.

In step S2707, the type of the recording medium is discriminated to beglossy paper. In step S2708, the type of the recording medium isdiscriminated to be photographic glossy paper.

In step S2709, it is determined whether the number of peak pixels issmaller than A4. If the number of peak pixels is smaller than A4, theprocess flow advances to step S2710, and if not, the process flowadvances to step S2711.

In step S2710, the type of the recording medium is discriminated to be aglossy film. In step S2711, the type of the recording medium isdiscriminated to be an OHP film.

In the flowchart shown in FIG. 27, there are two processing steps to beexecuted until the type of the recording medium is discriminated to beplain paper. In a recording apparatus in which plain paper is used athigh frequency, however, the process flow may be modified so as topromptly make the discrimination as to whether the type of the recordingmedium is plain paper. In such a situation, whether the type of therecording medium is plain paper can be discriminated first of all bypaying attention only to the number of peak pixels and discriminatingwhether the number of peak pixels is smaller than A1 beforediscriminating in step S2701 whether the intensity of the specularreflection light is smaller than B1. In that case, the type of therecording medium can also be discriminated based on the discriminationmap shown in FIG. 25 in a similar manner.

For the areas that are not allocated in FIG. 25 as areas used fordiscriminating the recording medium as a particular type of recordingmedium, e.g., for the areas in which the intensity of the specularreflection light is not smaller than B1 and the number of peak pixels issmaller than A2, the flowchart of FIG. 27 is designed so as todiscriminate the type of the recording medium to be glossy paper or aglossy film. However, the flowchart may be modified such that for thoseareas, the absence of any corresponding type of recording medium isdiscriminated and the process for discriminating the type of therecording medium is executed again. As an alternative, error processingto return an error signal indicating the absence of any correspondingtype of recording medium may be executed, and an error screen fornotifying the user of the absence of any corresponding type of recordingmedium may be displayed.

With this fifth embodiment, as with the first, second, third and fourthembodiments, a parameter indicated by the intensity of the specularreflection light from the recording medium and a parameter representingsurface conditions of the recording medium and derived from an image ofa predetermined area of the recording medium surface are obtained, andthe type of the recording medium is discriminated based on theseobtained parameters. By using the number of pixels at a histogram peakwhen discriminating the type of the recording medium, similar advantagesto those obtained in the case of employing the other parameters may beachieved. Also, the number of parameters used for the discrimination canbe increased by additionally employing the other parameters obtained inconnection with the creation of histograms such as a distribution width(equivalent to a brightness value) and a brightness value at thehistogram peak. As a result, the discrimination can be realized withhigher accuracy.

While in this embodiment the number of peak pixels is calculated as thetotal number of peak pixels having the brightness value at the histogrampeak, a total number of pixels in a near-peak area, i.e., the number ofpixels having the brightness values around the histogram peak may becalculated. This modification is effective in suppressing a variation inthe measurement. As an alternative, it is also possible to measure atendency of another feature and to use that feature as a parameter forthe discrimination.

While this embodiment employs the discrimination parameters 2306 indiscriminating the type of the recording medium, similar advantages canalso be obtained by employing a discrimination table in which the typesof recording media are related to the number of peak pixels and theintensity of the specular reflection light, as explained in the secondembodiment.

(Sixth Embodiment)

A sixth embodiment implementing the present invention will be describedbelow in detail with reference to the drawings.

A sixth embodiment of a recording medium type discriminating method fordiscriminating the type of the recording medium discriminates based onthe intensity of the specular reflection light and a brightness valuegiven as a difference between maximum and minimum values of brightnessof a plurality of pixels making up an image. The following descriptionis made of primarily the latter feature of this sixth embodiment. Aprocess flow and a discrimination flow are substantially the same asthose of the first embodiment, and hence a description thereof isomitted here.

FIG. 28 is a functional block diagram showing the recording mediumdiscriminating method according to the sixth embodiment.

A specular-reflection-light intensity detecting unit 2801 detects theintensity of one component of reflected lights from a surface of arecording medium, which is illuminated by a light source, i.e., theintensity of a specular reflection light having reflected at an angle ofreflection equal to an angle of incidence is detected.

An image information creating unit 2802 creates image information froman arbitrary small area of the recording medium surface. A function ofcreating the image information from a component of diffuse reflectionlight from the recording medium performed by the image informationcreating unit 2802, requirements for each pixel making up an image, etc.are similar to those of the first embodiment.

A maximum/minimum value detecting unit 2803 detects, from the imageinformation made up of a plurality of pixels and obtained in the imageinformation creating unit 2802, maximum and minimum values of brightnessby referring to brightness values of the pixels. A brightness differencecalculating unit 2804 calculates a brightness difference given as adifference between the maximum and minimum brightness values obtained inthe maximum/minimum value detecting unit 2803.

A recording medium type discrimination unit 2805 discriminates the typeof the recording medium. The type of the recording medium isdiscriminated from both the intensity of the specular reflection lightobtained in the specular-reflection-light intensity detecting unit 2801and the brightness difference obtained in the brightness differencecalculating unit 2804. The discrimination of the type of the recordingmedium is performed using parameters 2806 for discrimination, which arederived from a discrimination map prepared in advance and showing therelationships of various types of recording media versus the intensityof the specular reflection light and the brightness difference. Numeral2806 denotes parameters for discrimination, which are used indiscriminating the type of the recording medium in the recording mediumtype discrimination unit 2805, i.e., thresholds calculated based ondistributions measured for the various types of recording media are usedas the parameters for discrimination.

Thus, the process flow comprises the steps of detecting the intensity ofthe specular reflection light from the recording medium, calculating thebrightness difference from the image information of the arbitrary smallarea of the recording medium surface, and then discriminating the typeof the recording medium based on those results.

FIG. 29 is a histogram showing the relationship between the number ofpixels and a brightness value for an image. The horizontal axisrepresents the brightness value, and the vertical axis represents thenumber of pixels having respective brightness values.

Numeral 2901 denotes a histogram of the pixels constituting the imageinformation in terms of brightness. The histogram ideally exhibits anormal distribution, as shown, when measuring an image made up of anumber of pixels not smaller than a certain value. Numeral 2902 denotesan arithmetic mean value of brightness of the pixels making up theimage. The arithmetic mean value is a value at which the total number ofpixels constituting the histogram, i.e., an area of a hatched region inFIG. 29, is divided in half. Herein, such an arithmetic mean value issimply referred to as a “mean value”. This average value represents amean of the brightness of all the pixels, namely, the whiteness of therecording medium. Numerals 2903 and 2904 denote respective regionsdefined by dividing the area of the hatched region into two equal partsat the mean value. Numeral 2905 denotes a brightness value at a peak ofthe histogram. In an ideal condition, the arithmetic mean value betweenthe maximum and minimum brightness values used in the first to thirdembodiments, the mean value in this sixth embodiment, and the brightnessvalue at the peak coincide with each other. In this sixth embodiment,the value denoted by 2902 is referred to as a “mean value” and the valuedenoted by 2905 is referred to as a “brightness value at the peak (orpeak brightness value)”.

In this embodiment of the present invention, two kinds of features ofthe recording medium surface are obtained as parameters, and the type ofthe recording medium is discriminated based on these parameters. Bymeasuring the intensity of the specular reflection light and thebrightness difference resulting from a statistical process as describedabove, the features regarding the magnitude of unevenness of therecording medium surface are obtained. Herein, the magnitude ofunevenness of the recording medium surface obtained from the intensityof the specular reflection light is referred to as a “smoothness orgloss feature”, and the magnitude of unevenness of the recording mediumsurface obtained from the brightness difference is referred to as a“surface roughness feature”. A manner of discriminating the type of therecording medium based on those two features will be described below.

FIG. 30 is a discrimination map showing the relationships of varioustypes of recording media versus the brightness difference and theintensity of the specular reflection light. Circular regions in FIG. 30each represent a set of points corresponding to the measured results,and discrimination areas are defined by dividing a map plane as shownbased on the circular regions.

Numeral 3001 represents an area in which the recording medium undermeasurement is discriminated to be plain paper. Numeral 3002 representsan area in which it is discriminated to be ink-jet coated paper. Numeral3003 represents an area in which it is discriminated to be glossy paper.Numeral 3004 represents an area in which it is discriminated to bephotographic glossy paper. Numeral 3005 represents an area in which itis discriminated to be a glossy film. Numeral 3006 represents an area inwhich it is discriminated to be an OHP film.

A description is now briefly made of the relationships between featuresof the six types of recording media to be detected using the parametersof this embodiment, i.e., the intensity of the specular reflection lightand the brightness difference.

In plain paper, pulp fibers forming the paper appear on a paper surface.Hence, there is a tendency that the plain paper has a larger magnitudeof unevenness than the other types of recording media, and thisunevenness appears as dark and light levels of brightness in the createdimage information. Correspondingly, the plain paper shows a lower glosslevel. Also, a large difference between dark and light is related to alarge brightness difference.

Ink-jet coated paper is a recording medium formed by coating a pigment,e.g., silica, on a surface of plain paper. Therefore, the ink-jet coatedpaper has a smaller magnitude of unevenness than plain paper, thusresulting in a smaller surface roughness. Accordingly, the brightnessdifference of the ink-jet coated paper is smaller than that of the plainpaper. A gloss level of the ink-jet coated paper is comparable to orlower than that of the plain paper due to the effect of the pigment,e.g., silica, present on the recording medium surface.

Glossy paper is a recording medium formed by coating several layers ofan ink accepting substance on a surface of paper serving as a base. Theglossy paper has a smaller magnitude of unevenness than the plain paperand the ink-jet coated paper, and thus it has a higher smoothness and ahigher gloss level. As a result, the glossy paper shows a smallerbrightness difference.

Photographic glossy paper is a recording medium formed by processing thepaper in a manner similar to the above-mentioned glossy paper process.In addition, various improvements are performed on a paper surface torealize an image quality and weatherability comparable to those of aphotograph printed on photographic paper. The photographic glossy paperhas a smaller magnitude of unevenness than the glossy paper, and thus ithas a higher smoothness and a higher gloss level. As a result, thebrightness difference of the photographic glossy paper is slightlysmaller than that of the glossy paper.

A glossy film is a recording medium formed by coating an ink acceptinglayer on a surface of a film that is made of, e.g., white PET and servesas a base. The glossy film has a higher smoothness than the glossypaper, and its smoothness is comparable to that of the photographicglossy paper. As a result, the brightness difference of the glossy filmis slightly smaller than that of the glossy paper. Also, since the glossfilm uses a film as the base, the gloss level of the glossy film tendsto be slightly higher than that of the photographic glossy paper.

An OHP film is a recording medium formed by coating an ink acceptinglayer on a surface of a transparent film serving as a base. Because mostof a light illuminated from a light source passes through the recordingmedium without being reflected by the recording medium surface, the OHPfilm has a very small brightness value and hence the brightnessdifference is hardly noticeable. Further, the gloss level of the OHPfilm tends to be a much higher value than those of the other types ofrecording media.

The above-described relationships of the various types of recordingmedia versus the brightness difference and the intensity of the specularreflection light are summarized in Table 8 given below.

TABLE 8 Photo- graphic Plain Coated Glossy glossy Glossy OHP paper paperpaper paper film film (a) (b) (c) (d) (e) (f) Specular low low Mediumhigh higher higher reflection than (d) than (d) light intensityBrightness large medium medium small small very difference small

FIG. 31 is a flowchart showing a flow of a recording medium typediscriminating process in this sixth embodiment.

In step 3101 (S3101), the intensity of the specular reflection light isdetected. In step S3102, image information is created. In step S3103,brightness values of pixels are compared with each other based on theimage information obtained in step S3102. More specifically, maximum andminimum values of brightness are detected. In step S3104, a brightnessdifference is calculated as a difference between the maximum and minimumbrightness values obtained in step S3103. In step S3105, the type of therecording medium is discriminated based on the intensity of the specularreflection light obtained in step S3101 and the brightness differenceobtained as a feature variable in step S3104.

In the flowchart of the recording medium type discriminating processshown in FIG. 31, the intensity of the specular reflection light isdetected in step S3101, i.e., at the beginning of the process flow.However, it is only required that the intensity of the specularreflection light is detected before the type of the recording medium isdiscriminated in step S3105.

FIG. 32 is a flowchart showing a process flow for discrimination of thetype of the recording medium in step S3105 shown in FIG. 31.

Based on the discrimination map shown in FIG. 30, the type of therecording medium is discriminated using the two obtained parameters asfollows. For the following discussion, assume that the values A1, A2,B1, B2 and B3 satisfy the relationships given below. B1, B2 and B3 arevalues representing the intensity of the specular reflection light andsatisfy a relationship of B1<B2<B3. Also, A1 and A2 are valuesrepresenting the brightness difference and satisfy a relationship ofA1<A2.

In step 3201 (S3201), it is determined whether the intensity of thespecular reflection light is smaller than B2. If the intensity of thespecular reflection light is smaller than B2, the process flow advancesto step S3202, and if not, the process flow advances to step S3207.

In step S3202, it is determined whether the brightness difference issmaller than A2. If the brightness difference is smaller than A2, theprocess flow advances to step S3203, and if not, the process flowadvances to step S3206.

In step S3203, it is determined whether the intensity of the specularreflection light is smaller than B1. If the intensity of the specularreflection light is smaller than B1, the process flow advances to stepS3204, and if not, the process flow advances to step S3205.

In step S3204, the type of the recording medium is discriminated to beink-jet coated paper. In step S3205, the type of the recording medium isdiscriminated to be glossy paper. In step S3206, the type of therecording medium is discriminated to be plain paper. Alternatively, ifattention is paid only to the brightness difference, discriminatingwhether the type of the recording medium is plain paper can be done atthe beginning of the process by determining whether the brightnessdifference is larger than A2.

In step S3207, it is determined whether the brightness difference islarger than A1. If the brightness difference is larger than A1, theprocess flow advances to step S3208, and if not, the process flowadvances to step S3211.

In step S3208, it is determined whether the intensity of the specularreflection light is smaller than B3. If the intensity of the specularreflection light is smaller than B3, the process flow advances to stepS3209, and if not, the process flow advances to step S3210.

In step S3209, the type of the recording medium is discriminated to bephotographic glossy paper. In step S3210, the type of the recordingmedium is discriminated to be a glossy film. In step S3211, the type ofthe recording medium is discriminated to be an OHP film.

In the flowchart shown in FIG. 32, there are two processing steps to beexecuted until the type of the recording medium is discriminated to beplain paper. In a recording apparatus in which plain paper is used athigh frequency, however, the process flow may be modified so as topromptly make the discrimination as to whether the type of the recordingmedium is plain paper. In such a situation, whether the type of therecording medium is plain paper can be discriminated by paying attentiononly to the brightness difference and discriminating whether thebrightness difference is larger than A2 before discriminating in stepS3201 whether the intensity of the specular reflection light is smallerthan B2. In that case, the type of the recording medium can also bediscriminated based on the discrimination map shown in FIG. 30 in asimilar manner.

For the areas that are not allocated in FIG. 30 as areas used fordiscriminating the recording medium as a particular type of recordingmedium, e.g., for the areas in which the intensity of the specularreflection light is smaller than B3 and the brightness difference is notlarger than A1, the flowchart of FIG. 32 is designed so as todiscriminate the type of the recording medium to be ink-jet coatedpaper, glossy paper or an OHP film. However, the flowchart may bemodified such that, for those areas, the absence of any correspondingtype of recording medium is discriminated and the process fordiscriminating the type of the recording medium is executed again. As analternative, error processing to return an error signal indicating theabsence of any corresponding type of recording medium may be executed,and an error screen for notifying the user of the absence of anycorresponding type of recording medium may be displayed.

With this sixth embodiment, as with the first, second, third, fourth andfifth embodiments, a parameter indicated by the intensity of thespecular reflection light from the recording medium and a parameterrepresenting surface conditions of the recording medium and derived froman image of a predetermined area of the recording medium surface areobtained, and the type of the recording medium is discriminated based onthese obtained parameters. By using the brightness difference whendiscriminating the type of the recording medium, the accuracy indiscriminating, particularly, plain paper and ink-jet coated paper fromeach other can be improved.

While this embodiment employs the discrimination parameters 2806 indiscriminating the type of the recording medium, similar advantages canalso be obtained by employing a discrimination table in which the typesof recording media are related to each other by the brightnessdifference and the intensity of the specular reflection light asexplained in the second embodiment.

(Seventh Embodiment)

A seventh embodiment implementing the present invention will bedescribed below in detail with reference to the drawings.

FIG. 33 shows a memory map of a storage product for use in the seventhembodiment.

With this embodiment, the type of the recording medium can bediscriminated by connecting a storage medium, which stores program codesof software for realizing the functions of any of the above-describedembodiments to an apparatus or a system, and causing a computer (CPU orMPU) in the apparatus or the system to read and execute the programcodes stored in the storage medium. In that case, the program codes readout of the storage medium serve by themselves the functions of any ofthe above-described embodiments, and hence the storage medium storingthe program codes and the program codes themselves constitute thepresent invention.

Storage media for storing the program codes may be, e.g., magnetic diskssuch as Floppy (trade name) disks, hard disks, optical disks such asCD-ROM, CD−R, CD−RW, DVD−RAM, DVD−R, DVD+R and DVD+RW, magneto-opticaldisks such as MO, magnetic tapes, and nonvolatile memory cards such as aflash memory, and ROMs.

Also, the functions of any of the above-described embodiments arerealized not only by a computer executing program codes read out of thestorage medium, but also by an Operating System (OS) or the like whichis running on the computer and executes a part or the entirety of theactual processing in accordance with commands from the program codes,thereby realizing the functions of any of the above-describedembodiments. Those cases are also of course included in embodiments ofthe present invention.

Further, the present invention involves a case in which program codesread out of the storage medium are written in a memory provided in afunction add-on board inserted in the computer or a function add-on unitconnected to the computer, and a CPU or the like incorporated in thefunction add-on board or unit executes a part or the entirety of theactual processing in accordance with commands from the program codes,thereby realizing the functions of any of the above-describedembodiments.

When the present invention is applied to such a storage medium, theprogram codes corresponding to any of the flowcharts of FIGS. 8, 15, 26and 31 showing the recording medium type discriminating process arestored in the storage medium. To briefly explain the embodiment inconnection with the flowchart of FIG. 8 according to the firstembodiment, modules shown in the memory of FIG. 33 are stored in thestorage medium. More specifically, the storage medium is required tostore therein at least programs codes defining aspecular-reflection-light intensity detecting module 3301, an imageinformation taking-in module 3302, a binary-coding threshold calculatingmodule 3303, a binary coding module 3304, a number-of-reversalscalculating module 3305, and a recording medium type discriminatingmodule 3306. The binary-coding threshold calculating module 3303 may bea module for calculating at least one of the mean value of brightness ofall pixels, the arithmetic mean value between the maximum and minimumbrightness values, and the brightness value at the histogram peak. Also,corresponding to the other embodiments described above, thenumber-of-reversals calculating module 3305 may be replaced with arun-length code amount calculating module or a number-of-isolated pixelscalculating module. Further, the binary-coding threshold calculatingmodule 3303, the binary coding module 3304, and the number-of-reversalscalculating module 3305 may be replaced with a number-of-reversals ofpositive and negative signs calculating module, a number-of-peak pixelscalculating module, or a brightness difference calculating module.

As described above, even when the intended functions are realized by astorage medium storing computer-readable program codes or software inthe form of program codes themselves, it is possible to obtain a featureindicated by the intensity of the specular reflection light from therecording medium and a feature representing surface conditions of therecording medium and derived from an image of a predetermined area ofthe recording medium surface, and then discriminate the type of therecording medium with high accuracy based on the obtained features.

(Other Embodiments)

Other embodiments realizing the present invention will be describedbelow.

In the present invention, as described above, the image information ofthe recording medium surface is created and an image used for creatingthe image information may be one- or two-dimensional. However, some ofthe above embodiments have been described on an assumption that theparameters used for discriminating the type of the recording medium areextracted from a one-dimensional image. Hence, a processing method inthe case of producing a two-dimensional image by an area sensor or thelike will be briefly described below.

FIG. 34 is a representation showing conversion from two-dimensionalimage information into one-dimensional image information.

Two-dimensional image information can be thought as being made up of, asshown in FIG. 34, N sets of one-dimensional image information eacharranged in the form of a line having a length L. In this case, a totalnumber of pixels is L×N. Here, data (image information) in therespective lines are referred to as “Data 1”, “Data 2”, and so on. Thetwo-dimensional image information is converted into one-dimensionalimage information by joining the line data Data 1, Data 2, and so on,which constitute the two-dimensional image information, with each otherin series. With the conversion, line data having a length of L×N isproduced as one-dimensional image information.

While FIG. 34 schematically shows the conversion from two-dimensionalimage information into one-dimensional image information as a lineararray for easier understanding, it is possible in practical processingthat each line of data is subjected to processing, and processingresults are accumulated and used as the parameter for discriminating thetype of the recording medium. For example, Data 1 of the first line issubjected to binary coding, and the number of reversals is calculatedfrom a resulting binary image. In a similar manner, Data 2 is subjectedto binary coding, and the number of reversals is calculated. Then,similar processing is repeated on the data of the remaining lines.Finally, the numbers of reversals resulting from processing the data ofthe respective lines are added for the total number of lines. A totalnumber of reversals thus obtained can be used as the parameter fordiscriminating the type of the recording medium.

Typically, the arithmetic mean value calculated from maximum and minimumvalues of brightness of all (L×N) pixels, the mean value of brightnessof all the pixels, or the brightness value at the histogram peak is usedas the threshold for the binary coding. For the purpose of reducing aprocessing load, however, the process flow may be modified so as tocalculate a threshold and execute the binary coding in units of a line.To increase the accuracy in discriminating the type of the recordingmedium, it is desired that the brightness difference be calculated fromall the pixels.

In each of the embodiments described above, two parameters, i.e., theintensity the specular reflection light and one of the number ofreversals, the run-length code amount, etc., obtained from the imageinformation of the recording medium surface are employed and the type ofthe recording medium is discriminated by utilizing the correlationbetween those two parameters. However, three or more of the parametersdescribed in the above embodiments, for example, the intensity of thespecular reflection light, the brightness difference, the number ofreversals of pixel values after the binary coding, and the number ofreversals of positive and negative signs, may be used in a combined way.By employing a combination of three or more parameters, it is possibleto realize the discrimination with greater precision and higheraccuracy.

While the present invention has been described with reference to whatare presently considered to be the preferred embodiments, it is to beunderstood that the invention is not limited to the disclosedembodiments. On the contrary, the invention is intended to cover variousmodifications and equivalent arrangements included within the spirit andscope of the appended claims. The scope of the following claims is to beaccorded the broadest interpretation so as to encompass all suchmodifications and equivalent structures and functions.

1. A recording medium type discriminating method for discriminating thetype of a recording medium, comprising the steps of: creating, as imageinformation indicating surface conditions of the recording medium, imageinformation containing brightness information for each of a plurality ofpixels corresponding to a predetermined area of a recording mediumsurface; detecting a gloss level of the recording medium surface; anddiscriminating the type of the recording medium based on the gloss leveland a parameter obtained from the brightness information.
 2. A recordingmedium type discriminating method according to claim 1, wherein theparameter is obtained based on binary data resulting from binary codingof the image information, wherein said parameter represents at least oneof: the number of times values of adjacent pixels in the binary data arereversed; a run-length code amount resulting from allocating codes tothe binary data with run-length encoding; and the number of isolatedpixels, wherein the isolated pixels are determined from the binary datavalues of both pixels adjacent to each of the isolated pixels.
 3. Arecording medium type discriminating method according to claim 2,wherein a threshold used in the binary coding is one of a mean value ofthe brightness information and a brightness value at a peak of ahistogram created from the plurality of pixels.
 4. A recording mediumtype discriminating method according to claim 1, wherein the parameteris the number of times positive and negative signs indicating adifference in the brightness information between adjacent pixels arereserved.
 5. A recording medium type discriminating method according toclaim 1, wherein the parameter is one of the number of pixels having abrightness value at a peak of a histogram created from the plurality ofpixels and a brightness difference given as a difference between maximumand minimum values in the brightness information.
 6. A recording mediumtype discriminating method according to claim 1, wherein said detectingstep detects the gloss level by measuring an amount of a light reflectedfrom the recording medium surface after the recording medium surface hasbeen illuminated.
 7. A recording medium type discriminating methodaccording to claim 6, wherein the measured amount of the reflected lightis the intensity of a specular reflection light.
 8. A recording mediumtype discriminating method according to claim 1, wherein saiddiscriminating step discriminates the type of the recording medium usinga table which relates the gloss level and the parameter for varioustypes of recording media.
 9. A recording medium type discriminatingmethod according to claim 1, wherein said discriminating stepdiscriminates the type of the recording medium based on a plurality ofthresholds set depending on at least one of the gloss level and theparameter.
 10. A recording medium type discriminating method accordingto claim 9, wherein the plurality of thresholds are values set based ondistributions of at least one of the gloss level and the parametermeasured for each type of the recording medium.
 11. A recording mediumtype discriminating method according to claim 1, wherein plain paper andcoated paper are discriminated from each other based on the parameter.12. A recording medium type discriminating method according to claim 1,wherein said image information creating step obtains the imageinformation by detecting an image of a predetermined area of therecording medium.
 13. A recording medium type discriminating methodaccording to claim 1, wherein the image information is one- ortwo-dimensional image information.
 14. A recording medium typediscriminating method according to claim 13, wherein when the createdimage information is two-dimensional image information, said imageinformation creating step converts the two-dimensional image informationinto one-dimensional image information.
 15. A recording medium typediscriminating method according to claim 1, wherein photographic glossypaper and glossy film are discriminated from each other based on theparameter.
 16. A recording apparatus for recording an image on arecording medium, which is fed by feed means, in accordance withrecording data, the apparatus comprising: image information creatingmeans for creating image information indicating surface conditions ofthe recording medium fed by the feed means, wherein the imageinformation contains brightness information for each of a plurality ofpixels corresponding to a predetermined area of a recording mediumsurface; detecting means for detecting a gloss level of the recordingmedium surface; and discrimination means for discriminating the type ofthe recording medium based on the gloss level and a parameter obtainedfrom the brightness information.